Пример #1
0
	def Importing(self, root, basename):
		""" Importing module and set pydata object
		"""

		# check the loaded module during the start of plug-ins
		module = load_plugins(basename)

		### if module is exception (or tuple)
		if not inspect.ismodule(module):
			error = str(module)
			module = imp.new_module(basename)
			module.__doc__ = error
			module.__file__ = None

		index = self.InsertItem(root, basename)

		if module.__file__ != None:
			### only module to be activated is checked
			if basename in self.active_plugins_list:
				self.CheckItem(index)
			else:
				disable_plugin(basename)
		else:
			self.SetItemImage(index, 2)

		#### pyData setting
		self.SetPyData(index, (module, None))
Пример #2
0
    def Importing(self, root, basename):
        """ Importing module and set pydata object
		"""

        # check the loaded module during the start of plug-ins
        module = load_plugins(basename)

        ### if module is exception (or tuple)
        if not inspect.ismodule(module):
            error = str(module)
            module = imp.new_module(basename)
            module.__doc__ = error
            module.__file__ = None

        index = self.InsertItem(root, basename)

        if module.__file__ != None:
            ### only module to be activated is checked
            if basename in self.active_plugins_list:
                self.CheckItem(index)
            else:
                disable_plugin(basename)
        else:
            self.SetItemImage(index, 2)

        #### pyData setting
        self.SetPyData(index, (module, None))
Пример #3
0
def load_plugins(ide):
    TextLanguage.langs = loader.extensions.keys()
    plugins = pluginmanager.load_plugins()
    install_functions(plugins)
    install_gui(plugins, ide)