本文整理汇总了Python中yapsy.IPlugin.IPlugin类的典型用法代码示例。如果您正苦于以下问题:Python IPlugin类的具体用法?Python IPlugin怎么用?Python IPlugin使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了IPlugin类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self):
self.display_name = 'Action'
self.popularity = 0
self.cache = False
self.fast = True
self.action = False
IPlugin.__init__(self)
示例2: activate
def activate(self):
"""
On activation tell that this has been successfull.
"""
# get the automatic procedure from IPlugin
IPlugin.activate(self)
return
示例3: __init__
def __init__(self):
self.display_name = 'File Hasher'
self.popularity = 0
self.cache = True
self.fast = False
self.action = True
IPlugin.__init__(self)
示例4: __init__
def __init__(self):
self.display_name = 'Toggle Bookmark'
self.popularity = 0
self.cache = False
self.fast = False
self.action = False
IPlugin.__init__(self)
示例5: __init__
def __init__(self):
"""
init
"""
# initialise parent class
IPlugin.__init__(self)
TEST_MESSAGE("Version 1.2a1")
示例6: deactivate
def deactivate(self):
"""
On deactivation check that the 'activated' flag was on then
tell everything's ok to the test procedure.
"""
IPlugin.deactivate(self)
TEST_MESSAGE("Deactivated Version 1.2a1!")
示例7: __init__
def __init__(self):
IPlugin.__init__(self)
self.command_priority = 1
self.voice = None
bind_port = 54321 # number
host = get_ip_addresses()[0] # we just grab the first one that isn't local
while bind_port < 54329:
bind = '{0}:{1}'.format(host, str(bind_port))
try:
self.env = Environment(bind=bind, with_subscribers=False)
self.env.start()
break
except:
bind_port += 1
# retrieve or create device cache
self.devices = mc.get('footman_wemo_cache')
if not self.devices:
self.env.discover(5)
self.devices = self.env.list_switches()
mc.set('footman_wemo_cache', self.devices)
self.log = logging.getLogger(__name__)
self.commands = {
'.*turn (?P<command>on|off).*(?P<device>' + '|'.join([d.lower() for d in self.devices]) + ').*': [
{
'command': self.command,
'args': (None, None,),
'kwargs': {},
'command_priority': 0,
}
]
}
示例8: __init__
def __init__(self):
self.display_name = 'Hex View'
self.popularity = 3
self.cache = True
self.fast = False
self.action = False
self.icon = 'fa-file-code-o'
IPlugin.__init__(self)
示例9: __init__
def __init__(self):
self.display_name = 'Reg. View'
self.popularity = 8
self.cache = True
self.fast = False
self.action = False
self.icon = 'fa-windows'
IPlugin.__init__(self)
示例10: __init__
def __init__(self):
self.display_name = 'Download'
self.popularity = 1
self.cache = True
self.fast = False
self.action = False
self.icon = 'fa-download'
IPlugin.__init__(self)
示例11: __init__
def __init__(self):
self.display_name = 'PE File'
self.popularity = 7
self.cache = True
self.fast = False
self.action = False
self.icon = 'fa-cog'
IPlugin.__init__(self)
示例12: __init__
def __init__(self):
self.display_name = "PDF Info"
self.popularity = 5
self.cache = True
self.fast = False
self.action = False
self.icon = "fa-file-pdf-o"
IPlugin.__init__(self)
示例13: __init__
def __init__(self):
self.display_name = 'Exif Map'
self.popularity = 0 # To enable change to 4
self.cache = True
self.fast = False
self.action = False
self.icon = 'fa-map-marker'
IPlugin.__init__(self)
示例14: __init__
def __init__(self):
self.display_name = 'File Analyze'
self.popularity = 0
self.cache = False
self.fast = False
self.action = False
self.ignore_loader = ['preview', 'fa_timeline']
IPlugin.__init__(self)
示例15: __init__
def __init__(self):
self.display_name = 'Strings'
self.popularity = 4
self.cache = False
self.fast = False
self.action = False
self.icon = 'fa-file-text-o'
IPlugin.__init__(self)