本文整理汇总了Python中Action.Action.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Action.__init__方法的具体用法?Python Action.__init__怎么用?Python Action.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Action.Action
的用法示例。
在下文中一共展示了Action.__init__方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from Action import Action [as 别名]
# 或者: from Action.Action import __init__ [as 别名]
def __init__(self, nodeName, imageName, node, newText):
Action.__init__(self, node.documentOwner)
self.nodeName = nodeName
self.imageName = imageName
self.node = node
self.newText = newText
self.oldText = self.node.GetText()
示例2: __init__
# 需要导入模块: from Action import Action [as 别名]
# 或者: from Action.Action import __init__ [as 别名]
def __init__(self, **kwargs):
Action.__init__(self, **kwargs)
# Push Bullet settings -- set up in site.cfg, or override in local-site.cfg
self.access_token = kwargs.get('access_token', "XXX")
self.triggers = json.loads(kwargs.get('triggers',"[]"))
print "Got Triggers: ",self.triggers
self.start()
示例3: __init__
# 需要导入模块: from Action import Action [as 别名]
# 或者: from Action.Action import __init__ [as 别名]
def __init__ (self, command, *matchers):
"""
Command: command to execute
matchers: string(s) to match
"""
self.matchers = []
for m in matchers:
self.matchers.append(m.lower())
Action.__init__(self, command)
示例4: __init__
# 需要导入模块: from Action import Action [as 别名]
# 或者: from Action.Action import __init__ [as 别名]
def __init__(self, target, lookAt = None):
Action.__init__(self)
self.command = commands.Attack
self.target = target
self.params['description'] = 'Attack'
if lookAt is not None:
self.params['lookAt'] = lookAt
示例5: __init__
# 需要导入模块: from Action import Action [as 别名]
# 或者: from Action.Action import __init__ [as 别名]
def __init__(self, **kwargs):
Action.__init__(self, **kwargs)
# settings for XBee radio connect -- set up in site.cfg, or override in local-site.cfg
self.port = kwargs.get('port', "/dev/tty.usbmodem1431")
self.baud = int(kwargs.get('baud', 9600))
self.start_mute = int(kwargs.get('start_mute', 0)) # HHMM
self.end_mute = int(kwargs.get('end_mute', 0)) # HHMM
self.start()
self.timezone = kwargs.get('timezone', 'America/Los_Angeles')
示例6: __init__
# 需要导入模块: from Action import Action [as 别名]
# 或者: from Action.Action import __init__ [as 别名]
def __init__(self, target):
Action.__init__(self)
#Command
self.command = commands.Defend
#Facing direction
self.target = target
#Parametres supplementaires
self.params['description'] = 'Defend'
示例7: __init__
# 需要导入模块: from Action import Action [as 别名]
# 或者: from Action.Action import __init__ [as 别名]
def __init__(self, **kwargs):
Action.__init__(self, **kwargs)
# clock settings -- set up in site.cfg, or override in local-site.cfg
self.ring_quarters = parse_bool(kwargs.get('ring_quarters', False))
self.xmas_mode = parse_bool(kwargs.get('xmas_mode', False))
self.timezone = kwargs.get('timezone', 'America/Los_Angeles')
self.chimes = json.loads(kwargs.get('chimes',"{}"))
self.xmas_hours = json.loads(kwargs.get('xmas_hours',"[]"))
print "Got chimes", self.chimes
print "Got xmas_hours", self.xmas_hours
self.start()
示例8: __init__
# 需要导入模块: from Action import Action [as 别名]
# 或者: from Action.Action import __init__ [as 别名]
def __init__(self, **kwargs):
Action.__init__(self, **kwargs)
self.songs = json.loads(kwargs.get('songs',"{}"))
print "Got Songs", self.songs
self.start()
示例9: __init__
# 需要导入模块: from Action import Action [as 别名]
# 或者: from Action.Action import __init__ [as 别名]
def __init__(self, target):
Action.__init__(self)
self.command = commands.Charge
self.target = target
self.params['description'] = 'Charge'
示例10: __init__
# 需要导入模块: from Action import Action [as 别名]
# 或者: from Action.Action import __init__ [as 别名]
def __init__(self, command):
Action.__init__(self,command)
self.name = "RegexAction" + str(self.uid)
示例11: __init__
# 需要导入模块: from Action import Action [as 别名]
# 或者: from Action.Action import __init__ [as 别名]
def __init__(self, actor, sentry, label = '', routine = None,
arguments = {}, **kwds ):
Action.__init__(self, actor, label, routine, arguments, **kwds )
self.sentry = sentry
return
示例12: __init__
# 需要导入模块: from Action import Action [as 别名]
# 或者: from Action.Action import __init__ [as 别名]
def __init__( self, mgr, duration ):
Action.__init__( self )
self.__mgr = mgr
self.__duration = duration
示例13: __init__
# 需要导入模块: from Action import Action [as 别名]
# 或者: from Action.Action import __init__ [as 别名]
def __init__(self, mem):
Action.__init__(self)
self.target = WorldState()
self.parentId = None
self.m = mem