Vizitown
 All Classes Namespaces Files Functions Variables
vizitown_plugin.vt_as_app.RollbackImporter Class Reference

RollbackImporter. More...

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

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: