本文整理汇总了Python中pluginmanager.PluginManager.setPluginsDir方法的典型用法代码示例。如果您正苦于以下问题:Python PluginManager.setPluginsDir方法的具体用法?Python PluginManager.setPluginsDir怎么用?Python PluginManager.setPluginsDir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pluginmanager.PluginManager
的用法示例。
在下文中一共展示了PluginManager.setPluginsDir方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: RemoteData
# 需要导入模块: from pluginmanager import PluginManager [as 别名]
# 或者: from pluginmanager.PluginManager import setPluginsDir [as 别名]
class RemoteData(object):
"""Get data from remote data source
.. warning:: Only one plugin at time
"""
def __init__(self,plugdir):
self.pm = PluginManager()
if len(plugdir)>0:
self.pm.setPluginsDir( plugdir )
self.__loadPluginId = None
self.__plugin = None
def pluginsMetadata(self):
"""Get metadata for all plugins
"""
return ( self.pm.pluginsMetadata() )
def loadPlugin(self,plugid):
"""Load plugin by his id
:param plugid: id string for the plugin
:type plugid: str
"""
self.pm.unloadAll()
self.pm.loadPlugin(plugid)
self.__loadPluginId = plugid
# self.__plugin = self.pm.loadedPlugins()[0]
self.__plugin = self.pm.loadedPlugin(plugid)
def loadedPlugins(self):
"""Get metadata for all plugins
:returns: List of loaded plugins
:rtype: IPlugin
"""
return self.pm.loadedPlugins()
def planes(self):
"""Get data for table planes in MoSiVo database
:returns: List Planes table data
:rtype: list
"""
return self.__plugin.planes()
def rodalesd(self):
"""Get data for table planes in MoSiVo database
:returns: List Planes table data
:rtype: list
"""
return self.__plugin.rodalesd()
def ubicacionrodalesd(self):
"""Get data for table planes in MoSiVo database
:returns: List Planes table data
:rtype: list
"""
return self.__plugin.ubicacionrodalesd()
def gruposuelorodald(self):
"""Get data for table planes in MoSiVo database
:returns: List Planes table data
:rtype: list
"""
return self.__plugin.gruposuelorodald()
def raleorodalesd(self):
"""Get data for table planes in MoSiVo database
:returns: List Planes table data
:rtype: list
"""
return self.__plugin.raleorodalesd()
def turnorodalesd(self):
"""Get data for table planes in MoSiVo database
:returns: List Planes table data
:rtype: list
"""
return self.__plugin.turnorodalesd()
def rodalesp(self):
"""Get data for table planes in MoSiVo database
#.........这里部分代码省略.........