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


Python events.Events方法代码示例

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


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

示例1: __init__

# 需要导入模块: import events [as 别名]
# 或者: from events import Events [as 别名]
def __init__(self):
        self.events = Events() 
开发者ID:dantezhu,项目名称:haven,代码行数:4,代码来源:mixins.py

示例2: __init__

# 需要导入模块: import events [as 别名]
# 或者: from events import Events [as 别名]
def __init__(self, url=None, retry_timeout=None, max_retries=None):
        super(OrderBook, self).__init__(url, retry_timeout, max_retries)
        self._on_ping = Events()
        self._on_ping.on_change += self.on_ping
        self.order_nounces = {}
        self.order_books = {} 
开发者ID:slazarov,项目名称:python-bittrex-websocket,代码行数:8,代码来源:order_book.py

示例3: _assign_callbacks

# 需要导入模块: import events [as 别名]
# 或者: from events import Events [as 别名]
def _assign_callbacks(self):
        self._on_public_callback = Events()
        self._on_public_callback.on_change += self.on_public
        self._on_private_callback = Events()
        self._on_private_callback.on_change += self.on_private 
开发者ID:slazarov,项目名称:python-bittrex-websocket,代码行数:7,代码来源:websocket_client.py

示例4: __init__

# 需要导入模块: import events [as 别名]
# 或者: from events import Events [as 别名]
def __init__(
        self,
        accounts=None,
        markets=None,
        objects=None,
        on_tx=None,
        on_object=None,
        on_block=None,
        on_account=None,
        on_market=None,
        keep_alive=25,
        **kwargs
    ):
        # Events
        super(Notify, self).__init__()
        self.events = Events()

        # BitShares instance
        BlockchainInstance.__init__(self, **kwargs)

        # Callbacks
        if on_tx:
            self.on_tx += on_tx
        if on_object:
            self.on_object += on_object
        if on_block:
            self.on_block += on_block
        if on_account:
            self.on_account += on_account
        if on_market:
            self.on_market += on_market

        # Open the websocket
        self.websocket = BitSharesWebsocket(
            urls=self.blockchain.rpc.urls,
            user=self.blockchain.rpc.user,
            password=self.blockchain.rpc.password,
            accounts=accounts,
            markets=self.get_market_ids(markets),
            objects=objects,
            on_tx=on_tx,
            on_object=on_object,
            on_block=on_block,
            on_account=self.process_account,
            on_market=self.process_market,
            keep_alive=keep_alive,
        ) 
开发者ID:bitshares,项目名称:python-bitshares,代码行数:49,代码来源:notify.py


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