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


Python SelectReactor.__init__方法代码示例

本文整理汇总了Python中twisted.internet.selectreactor.SelectReactor.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python SelectReactor.__init__方法的具体用法?Python SelectReactor.__init__怎么用?Python SelectReactor.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在twisted.internet.selectreactor.SelectReactor的用法示例。


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

示例1: __init__

# 需要导入模块: from twisted.internet.selectreactor import SelectReactor [as 别名]
# 或者: from twisted.internet.selectreactor.SelectReactor import __init__ [as 别名]
        def __init__(self):
            SelectReactor.__init__(self)
            self.paused = False
            self._return_value = None
            self._release_requested = False
            self._mainLoopGen = None

            # Older versions of twisted do not have the _started attribute, make it a synonym for running in that case
            if not hasattr(self, '_started'):
                PausingReactor._started = property(lambda self: self.running)
开发者ID:Anaerin,项目名称:Flexget,代码行数:12,代码来源:plugin_deluge.py

示例2: __init__

# 需要导入模块: from twisted.internet.selectreactor import SelectReactor [as 别名]
# 或者: from twisted.internet.selectreactor.SelectReactor import __init__ [as 别名]
 def __init__(self, tempo=130, meters=(), reactor=None):
     self.tempo = tempo
     self.ticks = 0
     # self.setTempo(tempo)
     self._tick_interval = (60.0 / tempo) * (1.0 / 24)
     self.meters = meters
     self._meter_schedule = {}
     if not self.meters:
         self.meters = [Meter(4, 4, 1)]
     if not reactor:
         from twisted.internet import reactor
     self.reactor = reactor
     SelectReactor.__init__(self)
开发者ID:djfroofy,项目名称:txbeatlounge,代码行数:15,代码来源:scheduler2.py

示例3: __init__

# 需要导入模块: from twisted.internet.selectreactor import SelectReactor [as 别名]
# 或者: from twisted.internet.selectreactor.SelectReactor import __init__ [as 别名]
 def __init__(self, tempo=TEMPO_120_24, meter=None, meters=(), reactor=None,
              syncClockClass=None, default=False):
     """
     tempo: The tempo object (default: Tempo(120, 24))
     meter: Meter used by the clock - default to Meter(4,4,tempo=tempo)
     reactor: The underlying reactor to drive this BeatClock - this defaults
         to the global reactor (i.e "from twisted.internet import
         reactor")
     syncClockClass: SyncClock class to use for synchronizing the clock's
         ticks and scheduling offset (if None, no SyncClock will be used).
         See bl.sync.
     default: If True, BeatClock.defaultClock will be set to the instance -
         this is used by other components to get the default global
         BeatClock.
     """
     global clock
     self.tempo = tempo
     self.ticks = 0
     self.meters = meters
     self._meter_schedule = {}
     if not self.meters:
         self.meters = [Meter(4, 4, 1, tempo=self.tempo)]
     else:
         warnings.warn('meters argument is deprecated, use '
                       'meter=oneMeterNotAList instead')
     self.meter = meter or self.meters[0]
     if not reactor:
         from twisted.internet import reactor
     self.reactor = reactor
     if default or (self.defaultClock is None):
         BeatClock.defaultClock = self
         clock = self
     if syncClockClass:
         self.syncClock = syncClockClass(self)
         lasttick, ts = self.syncClock.lastTick()
         self.ticks = lasttick
     SelectReactor.__init__(self)
开发者ID:csv,项目名称:beatlounge,代码行数:39,代码来源:scheduler.py

示例4: __init__

# 需要导入模块: from twisted.internet.selectreactor import SelectReactor [as 别名]
# 或者: from twisted.internet.selectreactor.SelectReactor import __init__ [as 别名]
 def __init__(self, *args):
     SelectReactor.__init__(self, *args)
     self._releaseRequested = False
     self._mainLoopGen = None
开发者ID:Incantus,项目名称:incantus,代码行数:6,代码来源:pausingreactor.py

示例5: __init__

# 需要导入模块: from twisted.internet.selectreactor import SelectReactor [as 别名]
# 或者: from twisted.internet.selectreactor.SelectReactor import __init__ [as 别名]
 def __init__(self):
     SelectReactor.__init__(self)
     WmiReactorMixin.__init__(self)
开发者ID:aidenlai,项目名称:ZenPacks.zenoss.PySamba,代码行数:5,代码来源:reactor.py

示例6: __init__

# 需要导入模块: from twisted.internet.selectreactor import SelectReactor [as 别名]
# 或者: from twisted.internet.selectreactor.SelectReactor import __init__ [as 别名]
 def __init__(self):
     SelectReactor.__init__(self)
     self.loopCall = lambda: None
开发者ID:MaxFangX,项目名称:viff,代码行数:5,代码来源:reactor.py

示例7: __init__

# 需要导入模块: from twisted.internet.selectreactor import SelectReactor [as 别名]
# 或者: from twisted.internet.selectreactor.SelectReactor import __init__ [as 别名]
 def __init__(self):
     SelectReactor.__init__(self)
     connection = self.connectTCP('localhost', 8000, factory)
     pygame_test.prepare()
     installReactor(self)
开发者ID:ClashTeak,项目名称:writing_games_tutorial,代码行数:7,代码来源:multi_controller_test.py


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