本文整理匯總了Python中pluginmanager.PluginManager.loadPlugin方法的典型用法代碼示例。如果您正苦於以下問題:Python PluginManager.loadPlugin方法的具體用法?Python PluginManager.loadPlugin怎麽用?Python PluginManager.loadPlugin使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pluginmanager.PluginManager
的用法示例。
在下文中一共展示了PluginManager.loadPlugin方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: RemoteData
# 需要導入模塊: from pluginmanager import PluginManager [as 別名]
# 或者: from pluginmanager.PluginManager import loadPlugin [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
#.........這裏部分代碼省略.........