PluginManager/PluginManager.py

branch
maintenance
changeset 5730
6422afc7adc4
parent 5726
e1dbd217214a
child 5853
e45a570528a4
equal deleted inserted replaced
5695:9a71bd9e2e37 5730:6422afc7adc4
80 @keyparam doLoadPlugins flag indicating, that plugins should 80 @keyparam doLoadPlugins flag indicating, that plugins should
81 be loaded (boolean) 81 be loaded (boolean)
82 @keyparam develPlugin filename of a plugin to be loaded for 82 @keyparam develPlugin filename of a plugin to be loaded for
83 development (string) 83 development (string)
84 @exception PluginPathError raised to indicate an invalid plug-in path 84 @exception PluginPathError raised to indicate an invalid plug-in path
85 @exception PluginModulesError raised to indicate the absence of
86 plug-in modules
85 """ 87 """
86 super(PluginManager, self).__init__(parent) 88 super(PluginManager, self).__init__(parent)
87 89
88 self.__ui = parent 90 self.__ui = parent
89 self.__develPluginFile = develPlugin 91 self.__develPluginFile = develPlugin
335 @param name name of the module to be loaded (string) 337 @param name name of the module to be loaded (string)
336 @param directory name of the plugin directory (string) 338 @param directory name of the plugin directory (string)
337 @param reload_ flag indicating to reload the module (boolean) 339 @param reload_ flag indicating to reload the module (boolean)
338 @exception PluginLoadError raised to indicate an issue loading 340 @exception PluginLoadError raised to indicate an issue loading
339 the plug-in 341 the plug-in
342 @exception PluginPy2IncompatibleError raised to indicate the Python 2
343 incompatibility of a plug-in
340 """ 344 """
341 try: 345 try:
342 fname = "{0}.py".format(os.path.join(directory, name)) 346 fname = "{0}.py".format(os.path.join(directory, name))
343 module = imp.load_source(name, fname) 347 module = imp.load_source(name, fname)
344 if not hasattr(module, "autoactivate"): 348 if not hasattr(module, "autoactivate"):

eric ide

mercurial