本文整理汇总了Python中Action.Action.set_constants方法的典型用法代码示例。如果您正苦于以下问题:Python Action.set_constants方法的具体用法?Python Action.set_constants怎么用?Python Action.set_constants使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Action.Action
的用法示例。
在下文中一共展示了Action.set_constants方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Worker
# 需要导入模块: from Action import Action [as 别名]
# 或者: from Action.Action import set_constants [as 别名]
'add group' , 'remove group' ,
'set nick' , 'set message' ,
'set media' ,
'set picture' , 'set preferences' ,
'new conversation' , 'close conversation',
'send message' , 'conv invite',
'ft invite', 'ft accept',
'ft cancel', 'ft reject',
'call invite', 'call accept',
'call cancel', 'call reject',
'p2p invite' , 'p2p accept',
'p2p cancel' , 'media send', # media send if got Wink and audio clips
'send oim')
Event.set_constants(EVENTS)
Action.set_constants(ACTIONS)
class Worker(threading.Thread):
'''this class represent an object that waits for commands from the queue
of a socket, process them and add it as events to its own queue'''
def __init__(self, app_name, session):
'''class constructor'''
threading.Thread.__init__(self)
self.setDaemon(True)
self.app_name = app_name
self.in_login = False
self.session = session