本文整理匯總了Python中Action.Action.props[p]方法的典型用法代碼示例。如果您正苦於以下問題:Python Action.props[p]方法的具體用法?Python Action.props[p]怎麽用?Python Action.props[p]使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Action.Action
的用法示例。
在下文中一共展示了Action.props[p]方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: build_action
# 需要導入模塊: from Action import Action [as 別名]
# 或者: from Action.Action import props[p] [as 別名]
def build_action(self, response):
i = 0; A = None
while i <response.size():
if response.get(i).asString() == "Action":
if A != None:
A.connect("abstract_signal", self.abstract_action)
self.bootstrap_action(A); A = None
A = Action()
A.name = response.get(i+1).asString()
i +=2; continue
else:
p = response.get(i).asString()
try:
ps = response.get(i+1).asDouble()
except:
try:
ps = response.get(i+1).asInt()
except:
ps = response.get(i+1).asString()
if type(ps)==type(str()) and ps[0] == "$":
A.props_var[p] = response.get(i+1).asString()
A.props[p] = None
else:
A.props[p] = ps; A.props_var[p] = None
i +=2; continue
A.connect("abstract_signal", self.abstract_action)
self.bootstrap_action(A)