#NEWLINE# def loadAppPlugins( self ) : #NEWLINE# #INDENT# 'load all of the application plugins' #NEWLINE# my_dir = os . path . dirname ( __file__ ) #NEWLINE# for filename in os . listdir ( my_dir ) : #NEWLINE# #INDENT# if ( not filename . endswith ( '.py' ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( filename == '__init__.py' ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# modname = my_dir [ : ( - 3 ) ] #NEWLINE# try : #NEWLINE# #INDENT# mod = __import__ ( ( ( __name__ + '.' ) + modname ) , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , [ modname ] ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# err ( 'Application Plugin Loader Caught Exception' ) #NEWLINE# continue #NEWLINE# #UNINDENT# for ( name , obj ) in vars ( mod ) . items ( ) : #NEWLINE# #INDENT# if ( name in self . _classMap ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# if IDroneDApplication . implementedBy ( obj ) : #NEWLINE# #INDENT# self . _classMap [ name ] = copy . deepcopy ( obj ) #NEWLINE# #UNINDENT# #UNINDENT# except TypeError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# err ( 'Application Plugin Scanner Caught Exception' )