#NEWLINE# def __cleanup( self , _sys = sys , _shutdown_module = _shutdown_module ) : #NEWLINE# #INDENT# if ( self . mod is None ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# modname = self . mod . __name__ #NEWLINE# self . mod . __pluginbase_state__ = None #NEWLINE# self . mod = None #NEWLINE# try : #NEWLINE# #INDENT# delattr ( _internalspace , modname . spaceid ) #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# prefix = ( modname + '.' ) #NEWLINE# _sys . modules . pop ( modname ) #NEWLINE# for ( key , value ) in list ( _sys . modules . items ( ) ) : #NEWLINE# #INDENT# if ( not key . startswith ( prefix ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# mod = _sys . modules . pop ( key , None ) #NEWLINE# if ( mod is None ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# _shutdown_module ( mod )