本文整理匯總了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