#NEWLINE# def init( self ) : #NEWLINE# #INDENT# usage_message = [ 'Loading plugins from system-wide and user-specific lists:' , '  System-wide List:      {}' . format ( SYS_PLUGIN_LIST_PATH ) , '  User-specific List:    {}' . format ( USER_PLUGIN_LIST_PATH ) ] #NEWLINE# if PROJECT_PLUGIN_LIST_PATH : #NEWLINE# #INDENT# usage_message . append ( '  Project-specific List: {}' . format ( PROJECT_PLUGIN_LIST_PATH ) ) #NEWLINE# #UNINDENT# message ( * usage_message ) #NEWLINE# if ( not os . path . isfile ( SYS_PLUGIN_LIST_PATH ) ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# with open ( SYS_PLUGIN_LIST_PATH , 'wb' ) : #NEWLINE# #INDENT# message ( 'Created system plugin list at {}' . format ( SYS_PLUGIN_LIST_PATH ) ) #NEWLINE# #UNINDENT# #UNINDENT# except IOError : #NEWLINE# #INDENT# message ( 'Failed creating system plugin list at {}' . format ( SYS_PLUGIN_LIST_PATH ) ) #NEWLINE# #UNINDENT# #UNINDENT# if ( not os . path . isfile ( USER_PLUGIN_LIST_PATH ) ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# with open ( USER_PLUGIN_LIST_PATH , 'wb' ) : #NEWLINE# #INDENT# message ( 'Created user plugin list at {}' . format ( USER_PLUGIN_LIST_PATH ) ) #NEWLINE# #UNINDENT# #UNINDENT# except IOError : #NEWLINE# #INDENT# message ( 'Failed creating user plugin list at {}' . format ( USER_PLUGIN_LIST_PATH ) ) #NEWLINE# #UNINDENT# #UNINDENT# for path in iter_plugin_paths ( ) : #NEWLINE# #INDENT# if ( not os . path . isfile ( path ) ) : #NEWLINE# #INDENT# message ( 'Plugin file not found: {}' . format ( usage_message ) ) #NEWLINE# continue #NEWLINE# #UNINDENT# idaapi . load_plugin ( path ) #NEWLINE# #UNINDENT# return idaapi . PLUGIN_SKIP