当前位置: 首页>>代码示例>>Python>>正文


Python IPlugin.IPlugin方法代码示例

本文整理汇总了Python中yapsy.IPlugin.IPlugin方法的典型用法代码示例。如果您正苦于以下问题:Python IPlugin.IPlugin方法的具体用法?Python IPlugin.IPlugin怎么用?Python IPlugin.IPlugin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在yapsy.IPlugin的用法示例。


在下文中一共展示了IPlugin.IPlugin方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from yapsy import IPlugin [as 别名]
# 或者: from yapsy.IPlugin import IPlugin [as 别名]
def __init__(self, decorated_object=None,
				 # The following args will only be used if we need to
				 # create a default PluginManager
				 categories_filter=None, 
				 directories_list=None, 
				 plugin_info_ext="yapsy-plugin"):
		if directories_list is None:
			directories_list = [os.path.dirname(__file__)]
		if categories_filter is None:
			categories_filter = {"Default": IPlugin}
		if decorated_object is None:
			log.debug("Creating a default PluginManager instance to be decorated.")
			from yapsy.PluginManager import PluginManager
			decorated_object = PluginManager(categories_filter, 
											 directories_list,
											 plugin_info_ext)
		self._component = decorated_object 
开发者ID:xtiankisutsa,项目名称:MARA_Framework,代码行数:19,代码来源:PluginManagerDecorator.py

示例2: __init__

# 需要导入模块: from yapsy import IPlugin [as 别名]
# 或者: from yapsy.IPlugin import IPlugin [as 别名]
def __init__(self,
				 plugin_install_dir=None,
				 decorated_manager=None,
				 # The following args will only be used if we need to
				 # create a default PluginManager
				 categories_filter=None, 
				 directories_list=None, 
				 plugin_info_ext="yapsy-plugin"):
		if categories_filter is None:
			categories_filter = {"Default":IPlugin}
		# Create the base decorator class
		PluginManagerDecorator.__init__(self,
										decorated_manager,
										categories_filter,
										directories_list,
										plugin_info_ext)
		# set the directory for new plugins
		self.plugins_places=[]
		self.setInstallDir(plugin_install_dir) 
开发者ID:xtiankisutsa,项目名称:MARA_Framework,代码行数:21,代码来源:AutoInstallPluginManager.py

示例3: test_plugin

# 需要导入模块: from yapsy import IPlugin [as 别名]
# 或者: from yapsy.IPlugin import IPlugin [as 别名]
def test_plugin(self):
        self.assertTrue(issubclass(Py2SwaggerPlugin, IPlugin))

        plugin = Py2SwaggerPlugin()

        self.assertEqual('', plugin.summary)
        self.assertEqual('', plugin.description)
        self.assertEqual(None, plugin.set_parser_arguments(None))

        self.assertRaises(NotImplementedError, plugin.run, []) 
开发者ID:Arello-Mobile,项目名称:py2swagger,代码行数:12,代码来源:test_plugins.py

示例4: pre_activate

# 需要导入模块: from yapsy import IPlugin [as 别名]
# 或者: from yapsy.IPlugin import IPlugin [as 别名]
def pre_activate(self, args, sample_rate=250, eeg_channels=8, aux_channels=3, imp_channels=0):
        self.args = args
        self.sample_rate = sample_rate
        self.eeg_channels = eeg_channels
        self.aux_channels = aux_channels
        self.imp_channels = imp_channels
        # by default we say that activation was okay -- inherited from IPlugin
        self.is_activated = True
        self.activate()
        # tell outside world if init went good or bad
        return self.is_activated

    # inherited from IPlugin 
开发者ID:openbci-archive,项目名称:OpenBCI_Python,代码行数:15,代码来源:plugin_interface.py

示例5: __init__

# 需要导入模块: from yapsy import IPlugin [as 别名]
# 或者: from yapsy.IPlugin import IPlugin [as 别名]
def __init__(self, 
				 decorated_manager=None,
				 categories_filter=None, 
				 directories_list=None, 
				 plugin_info_ext="yapsy-plugin"):
		if categories_filter is None:
			categories_filter = {"Default":IPlugin}
		# Create the base decorator class
		PluginManagerDecorator.__init__(self,decorated_manager,
										categories_filter,
										directories_list,
										plugin_info_ext)
		# prepare the mapping of the latest version of each plugin
		self.rejectedPlugins =  [ ] 
开发者ID:xtiankisutsa,项目名称:MARA_Framework,代码行数:16,代码来源:FilteredPluginManager.py

示例6: __init__

# 需要导入模块: from yapsy import IPlugin [as 别名]
# 或者: from yapsy.IPlugin import IPlugin [as 别名]
def __init__(self,
				 categories_filter=None,
				 directories_list=None,
				 plugin_info_ext=None,
				 plugin_locator=None):
		# as a good practice we don't use mutable objects as default
		# values (these objects would become like static variables)
		# for function/method arguments, but rather use None.
		if categories_filter is None:
			categories_filter = {"Default":IPlugin}
		self.setCategoriesFilter(categories_filter)
		plugin_locator = self._locatorDecide(plugin_info_ext, plugin_locator)
		# plugin_locator could be either a dict defining strategies, or directly
		# an IPluginLocator object
		self.setPluginLocator(plugin_locator, directories_list) 
开发者ID:xtiankisutsa,项目名称:MARA_Framework,代码行数:17,代码来源:PluginManager.py

示例7: __init__

# 需要导入模块: from yapsy import IPlugin [as 别名]
# 或者: from yapsy.IPlugin import IPlugin [as 别名]
def __init__(self, 
				 decorated_manager=None,
				 categories_filter={"Default":IPlugin}, 
				 directories_list=None, 
				 plugin_info_ext="yapsy-plugin"):
		# Create the base decorator class
		PluginManagerDecorator.__init__(self,decorated_manager,
										categories_filter,
										directories_list,
										plugin_info_ext)
		self.setPluginInfoClass(VersionedPluginInfo)
		# prepare the storage for the early version of the plugins,
		# for which only the latest version is the one that will be
		# kept in the "core" plugin storage.
		self._prepareAttic() 
开发者ID:xtiankisutsa,项目名称:MARA_Framework,代码行数:17,代码来源:VersionedPluginManager.py


注:本文中的yapsy.IPlugin.IPlugin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。