當前位置: 首頁>>代碼示例>>Python>>正文


Python PluginManager.setPluginsDir方法代碼示例

本文整理匯總了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
        
#.........這裏部分代碼省略.........
開發者ID:fpacheco,項目名稱:mosivo,代碼行數:103,代碼來源:remotedata.py


注:本文中的pluginmanager.PluginManager.setPluginsDir方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。