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


Python Plugin.Plugin类代码示例

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


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

示例1: __init__

	def __init__( self ):
		Plugin.__init__( self, "W9Replay", "http://www.w9replay.fr/", 1 )
		
		self.listeEmissionsCourantes = {}
		
		if os.path.exists( self.fichierCache ):
			self.listeFichiers = self.chargerCache()
开发者ID:oogl-import,项目名称:tvdownloader,代码行数:7,代码来源:W9Replay.py

示例2: __init__

    def __init__(self, station, connector):
        Plugin.__init__(self)

        self._station = station
        self._connector = connector['icq']

        self.report = None
开发者ID:BackupTheBerlios,项目名称:nanoicq,代码行数:7,代码来源:weather.py

示例3: __init__

	def __init__( self ):
		Plugin.__init__( self, "M6Replay", "www.m6replay.fr/", 1 )
		
		self.listeFichiers = {} # Clefs = nomChaine, Valeurs = { nomEmission, [ [ Episode 1, Date1, URL1 ], ... ] }

		if os.path.exists( self.fichierCache ):
			self.listeFichiers = self.chargerCache()
开发者ID:oogl-import,项目名称:tvdownloader,代码行数:7,代码来源:M6Replay.py

示例4: __init__

	def __init__( self):
		Plugin.__init__( self, "Pluzz", "http://www.pluzz.fr/")
		
		cache = self.chargerCache()
		if cache:
			self.listeChaines = cache
		else:
			self.listeChaines = {}
开发者ID:oogl-import,项目名称:tvdownloader,代码行数:8,代码来源:Pluzz.py

示例5: __init__

	def __init__( self):
		Plugin.__init__( self, "Europe1", "http://www.europe1.fr", 1 )
		# On instancie la classe qui permet de charger les pages web
		
		self.listeEmissions = {} # Clef = nom emission ; Valeur = lien fichier XML qui contient la liste des emissions
		
		if os.path.exists( self.fichierCache ):
			self.listeEmissions = self.chargerCache()
开发者ID:oogl-import,项目名称:tvdownloader,代码行数:8,代码来源:Europe1.py

示例6: analyseBundle

def analyseBundle(bundleId):
    bundle = config.bundleTable.find_one({"bundleId": bundleId})

    if bundle == None:
        logging.error("No matching bundle has been found")
        abort(make_response("No matching bundle has been found", 400))

    if bundle["archivePath"] == None: 
        logging.error("The bundle as no directory path")
        abort(make_response("The bundle as no directory path", 400))

    headers = {'content-type': 'application/gzip'}
    analyseReturn = requests.post(
        config.uriAnalyser+"/bundle/"+str(bundleId),
        data=open(bundle["archivePath"], 'r').read(),
        headers=headers).json()

    # logging.error("analyzeBundle analyseReturn: " + str(analyseReturn))

    pluginIdOffset = config.pluginTable.count()

    while 1:
        analyseReturn = requests.get(config.uriAnalyser+"/bundle/"+str(bundleId)).json()

        if analyseReturn['status'] == "done":
            bundleData = analyseReturn['datas']
            break
        sleep(1)

    for index, plugin in enumerate(bundleData['plugins']) :
        pluginId = pluginIdOffset + index
        
        currentPlugin = Plugin(pluginId, bundleId)
        currentPlugin.clips = plugin['clips']
        currentPlugin.parameters = plugin['parameters']
        currentPlugin.properties = plugin['properties']
        currentPlugin.rawIdentifier = plugin['rawIdentifier']
        currentPlugin.version = plugin['version']

        # Gets Label/ShortLabel and ensures a non-empty value.
        currentPlugin.label = currentPlugin.getPropValueFromKeys(
            ('OfxPropLabel', 'OfxPropShortLabel', 'OfxPropLongLabel'),
            currentPlugin.rawIdentifier)
        currentPlugin.shortLabel = currentPlugin.getPropValueFromKeys(
            ('OfxPropShortLabel', 'OfxPropLongLabel'),
            currentPlugin.label)

        bundle['plugins'].append(pluginId)
        config.pluginTable.insert(currentPlugin.__dict__)
    return mongodoc_jsonify(bundle)
开发者ID:LoRayZm,项目名称:ShuttleOFX,代码行数:50,代码来源:views.py

示例7: __init__

    def __init__(self, controller, msn):
        Plugin.__init__(self, controller, msn)

        self.msn = msn
        self.enabled = False

        self.winkCacheDir = os.path.join(self.msn.cacheDir,'winks')
        if not os.path.exists(self.winkCacheDir):
            os.mkdir(self.winkCacheDir)
        self.autoplay = False
        self.checkIfHasGnash()
        
        self.config = controller.config
        self.config.readPluginConfig(self.name)
开发者ID:csuarez,项目名称:emesene-1.6.3-fixed,代码行数:14,代码来源:WinkReceiving.py

示例8: __init__

 def __init__(self, opt):
     if "plugin" not in opt:
         raise ValueError("no plugin selected")
     self.botId = self._pickAName()
     self.params = opt
     self.logger = Plugin().load("plugins/Logger_" + opt["plugin"] + ".py")
     self.logger.constructor(self.params)
开发者ID:mickael-kerjean,项目名称:crawlr,代码行数:7,代码来源:Logger.py

示例9: Backend

class Backend(object):
    def __init__(self, opt):
        if 'plugin' not in opt:
            raise ValueError("no plugin selected")
        self.params = opt;
        self.backend = Plugin().load("plugins/Backend_"+opt['plugin']+".py")
        self.backend.constructor(self.params)

    def alreadyExist(self, key):
        res = self.backend.alreadyExist(key);
        if not isinstance(res, bool):
            raise TypeError('issues with the plugin: '+self.params['plugin']);
        else:
            return res;

    def put(self, key, obj):
        self.backend.put(key, obj);
开发者ID:mickael-kerjean,项目名称:crawlr,代码行数:17,代码来源:Backend.py

示例10: instancierPlugins

	def instancierPlugins( self ):
		for plugin in Plugin.__subclasses__(): # Pour tous les plugins
			try:
				# Instance du plugin
				inst = plugin()
			except Exception as exc:
				logger.error( "impossible d'instancier le plugin %s: %s" %( plugin,  exc.message) )
				traceback.print_exc()
				continue
			# Nom du plugin
#			nom = inst.nom#FIXME Utiliser le nom de la classe
			# Ajout du plugin
#			self.listeInstances[ nom ] = inst
			self.ajouterPlugin(inst)
开发者ID:oogl-import,项目名称:tvdownloader,代码行数:14,代码来源:PluginManager.py

示例11: __init__

	def __init__(self):
		Plugin.__init__(self, "videarn.com", "videarn.png")
开发者ID:13K-OMAR,项目名称:enigma2-plugins-sh4,代码行数:2,代码来源:videarn.py

示例12: __init__

	def __init__(self):
		Plugin.__init__(self)
		self.requiredInput = ['MXRecord']
		self.category = 'SMTP'
开发者ID:dotse,项目名称:Mailcheck,代码行数:4,代码来源:StandardAddresses.py

示例13: __init__

	def __init__( self ):
		Plugin.__init__( self, "France Inter", "http://sites.radiofrance.fr/franceinter/accueil/", 30 )
		
		if os.path.exists( self.fichierCache ):
			self.listeEmissions = self.chargerCache()
开发者ID:oogl-import,项目名称:tvdownloader,代码行数:5,代码来源:FranceInter.py

示例14: run

#!/usr/bin/python

from Plugin import Plugin

def run(bot, serv, ev) :
	pass

REGEX = '.'
REGEXES_RUN = { REGEX : run }
plugin = Plugin(REGEXES_RUN)

if __name__ == '__main__' :
	plugin.test('test', None)
开发者ID:corndl,项目名称:glowing-cyril,代码行数:13,代码来源:exemple.py

示例15: __init__

	def __init__( self ):
		Plugin.__init__( self, "La Chaine Parlementaire", "http://www.lcp.fr/", 7 )
		
		if( os.path.exists( self.fichierCache ) ):
			self.listeEmissions = self.chargerCache()
开发者ID:oogl-import,项目名称:tvdownloader,代码行数:5,代码来源:LCP.py


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