當前位置: 首頁>>代碼示例>>Python>>正文


Python Action.__init__方法代碼示例

本文整理匯總了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()
開發者ID:nsmoooose,項目名稱:csp,代碼行數:9,代碼來源:ModifyXmlAction.py

示例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()
開發者ID:jbum,項目名稱:carillon,代碼行數:10,代碼來源:PushBullet.py

示例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)
開發者ID:nosemeocurrenada,項目名稱:StupidClip,代碼行數:11,代碼來源:StringAction.py

示例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
開發者ID:etiennenoel,項目名稱:ctf,代碼行數:11,代碼來源:ActionAttack.py

示例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')
開發者ID:jbum,項目名稱:carillon,代碼行數:12,代碼來源:Chime.py

示例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'
開發者ID:etiennenoel,項目名稱:ctf,代碼行數:13,代碼來源:ActionDefend.py

示例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()
開發者ID:jbum,項目名稱:carillon,代碼行數:15,代碼來源:Clock.py

示例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()
開發者ID:jbum,項目名稱:carillon,代碼行數:8,代碼來源:Transcribe.py

示例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'
開發者ID:etiennenoel,項目名稱:ctf,代碼行數:7,代碼來源:ActionCharge.py

示例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)
開發者ID:nosemeocurrenada,項目名稱:StupidClip,代碼行數:5,代碼來源:RegexAction.py

示例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
開發者ID:danse-inelastic,項目名稱:inelastic-svn,代碼行數:7,代碼來源:ActionRequireAuthentication.py

示例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
開發者ID:jacquev6,項目名稱:ViDE,代碼行數:6,代碼來源:test_Action.py

示例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
開發者ID:kumar54,項目名稱:Dev-PSchema,代碼行數:7,代碼來源:TargetAction.py


注:本文中的Action.Action.__init__方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。