Vizitown

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables
Public Member Functions | Public Attributes | List of all members
vizitown_plugin.vt_as_app.RollbackImporter Class Reference

RollbackImporter. More...

Inheritance diagram for vizitown_plugin.vt_as_app.RollbackImporter:
Collaboration diagram for vizitown_plugin.vt_as_app.RollbackImporter:

## Public Member Functions
def | __init__
| Constructor. More...
def | uninstall
| uninstall method unload all the module More...

## Public Attributes
| oldmodules

## Detailed Description

RollbackImporter.

RollbackImporter instances install themselves as a proxy for the built-in :func:`__import__` function that lies behind the 'import' statement. Once installed, they note all imported modules, and when uninstalled, they delete those modules from the system module list; this ensures that the modules will be freshly loaded from their source code when next imported.

Usage::

    if self.rollbackImporter:
        self.rollbackImporter.uninstall()
    self.rollbackImporter = RollbackImporter()
    # import some modules

## Constructor & Destructor Documentation

def vizitown_plugin.vt_as_app.RollbackImporter.__init__ | ( |  | self) |  |

Constructor.

    Init the RollbackImporter and setup the import proxy.

## Member Function Documentation

def vizitown_plugin.vt_as_app.RollbackImporter.uninstall | ( |  | self) |  |

uninstall method unload all the module

    Unload all modules since __init__ and restore the original import.

## Member Data Documentation

vizitown_plugin.vt_as_app.RollbackImporter.oldmodules

The documentation for this class was generated from the following file:

- vt_as_app.py