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


Python Command.__init__方法代碼示例

本文整理匯總了Python中Command.Command.__init__方法的典型用法代碼示例。如果您正苦於以下問題:Python Command.__init__方法的具體用法?Python Command.__init__怎麽用?Python Command.__init__使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Command.Command的用法示例。


在下文中一共展示了Command.__init__方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: from Command import Command [as 別名]
# 或者: from Command.Command import __init__ [as 別名]
 def __init__(self, plane, base, nb_drop):
     Command.__init__(self)
     if plane is None or base is None:
         raise "DropMilitarsCommand : Null reference"
     self.planeSrc = plane
     self.baseTarget = base
     self.quantity = nb_drop
開發者ID:cod-insa,項目名稱:cod-insa-2014,代碼行數:9,代碼來源:DropMilitarsCommand.py

示例2: __init__

# 需要導入模塊: from Command import Command [as 別名]
# 或者: from Command.Command import __init__ [as 別名]
 def __init__(self, config):
   Command.__init__(self, config)
   if self.config.has_key('directory') and not os.path.isdir(self.config['directory']):
     raise Exception("directory '%s' does not exists" % (self.config['directory'],))
   if self.config.has_key('directory') and not os.listdir(self.config['directory']):
     raise Exception("directory '%s' is empty" % (self.config['directory'],))
   if not self.config.has_key('count'):
     self.config['count'] = 1
開發者ID:serl,項目名稱:rasplarm,代碼行數:10,代碼來源:Mp3.py

示例3: __init__

# 需要導入模塊: from Command import Command [as 別名]
# 或者: from Command.Command import __init__ [as 別名]
 def __init__(self, plane, mil_qty, fuel_qty, delete):
     Command.__init__(self)
     if plane is None:
         raise "LoadRessourcesCommand : Null reference"
     self.planeSrc = plane
     self.militarQuantity = mil_qty
     self.fuelQuantity = fuel_qty
     self.delete_ressources = delete
開發者ID:cod-insa,項目名稱:cod-insa-2014,代碼行數:10,代碼來源:ExchangeResourcesCommand.py

示例4: __init__

# 需要導入模塊: from Command import Command [as 別名]
# 或者: from Command.Command import __init__ [as 別名]
 def __init__(self, config, **params):
     Command.__init__(self, config, **params)
開發者ID:far-rel,項目名稱:Pails,代碼行數:4,代碼來源:Routes.py

示例5: __init__

# 需要導入模塊: from Command import Command [as 別名]
# 或者: from Command.Command import __init__ [as 別名]
 def __init__(self):
     Command.__init__(self, Constants.SHUTDOWN_TAG)
開發者ID:tadgh,項目名稱:Shizuka,代碼行數:4,代碼來源:ShutdownCommand.py

示例6: __init__

# 需要導入模塊: from Command import Command [as 別名]
# 或者: from Command.Command import __init__ [as 別名]
	def __init__(self, main):
		Command.__init__(self, main)
開發者ID:Joby890,項目名稱:LSV2,代碼行數:4,代碼來源:ScriptCommand.py

示例7: __init__

# 需要導入模塊: from Command import Command [as 別名]
# 或者: from Command.Command import __init__ [as 別名]
	def __init__(self):
		Command.__init__(self)
開發者ID:longstl,項目名稱:python_mud,代碼行數:4,代碼來源:Cast.py

示例8: __init__

# 需要導入模塊: from Command import Command [as 別名]
# 或者: from Command.Command import __init__ [as 別名]
	def __init__(self, template):
		Command.__init__(self)
		self.eventTemplate = template
開發者ID:longstl,項目名稱:python_mud,代碼行數:5,代碼來源:Emote.py

示例9: __init__

# 需要導入模塊: from Command import Command [as 別名]
# 或者: from Command.Command import __init__ [as 別名]
 def __init__(self, plane, base):
     Command.__init__(self)
     if base is None or plane is None:
         raise "LandCommand : null reference"
     self.plane = plane
     self.base = base
開發者ID:cod-insa,項目名稱:cod-insa-2014,代碼行數:8,代碼來源:LandCommand.py

示例10: __init__

# 需要導入模塊: from Command import Command [as 別名]
# 或者: from Command.Command import __init__ [as 別名]
 def __init__(self, plane, quantity_fuel):
     Command.__init__(self)
     if plane is None:
         raise "FillFuelTankCommand : Null reference"
     self.planeSrc = plane
     self.quantity = quantity_fuel
開發者ID:cod-insa,項目名稱:cod-insa-2014,代碼行數:8,代碼來源:FillFuelTankCommand.py

示例11: __init__

# 需要導入模塊: from Command import Command [as 別名]
# 或者: from Command.Command import __init__ [as 別名]
 def __init__(self, plane):
     Command.__init__(self)
     if plane is None:
         raise "WaitCommand : null reference"
     self.plane = plane
開發者ID:cod-insa,項目名稱:cod-insa-2014,代碼行數:7,代碼來源:WaitCommand.py

示例12: __init__

# 需要導入模塊: from Command import Command [as 別名]
# 或者: from Command.Command import __init__ [as 別名]
 def __init__(self):
     Command.__init__(self, Constants.RESTART_TAG)
開發者ID:tadgh,項目名稱:Shizuka,代碼行數:4,代碼來源:RestartCommand.py

示例13: __init__

# 需要導入模塊: from Command import Command [as 別名]
# 或者: from Command.Command import __init__ [as 別名]
 def __init__(self):
     Command.__init__(self, Constants.NETWORK_INFO_TAG)
開發者ID:tadgh,項目名稱:Shizuka,代碼行數:4,代碼來源:NetworkInfoCommand.py

示例14: __init__

# 需要導入模塊: from Command import Command [as 別名]
# 或者: from Command.Command import __init__ [as 別名]
 def __init__(self, plane, target):
     Command.__init__(self)
     if p is None or target is None:
         raise Error("Attack Command :  null reference")
     self.planeSrc = plane
     self.planeTarget = target
開發者ID:cod-insa,項目名稱:cod-insa-2014,代碼行數:8,代碼來源:AttackCommand.py

示例15: __init__

# 需要導入模塊: from Command import Command [as 別名]
# 或者: from Command.Command import __init__ [as 別名]
 def __init__(self, plane, coord):
     Command.__init__(self)
     if plane is None:
         raise "MoveCommand : null reference"
     self.plane = plane
     self.destination = coord
開發者ID:cod-insa,項目名稱:cod-insa-2014,代碼行數:8,代碼來源:MoveCommand.py


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