本文整理汇总了Python中Command.Command.setPropertyList方法的典型用法代码示例。如果您正苦于以下问题:Python Command.setPropertyList方法的具体用法?Python Command.setPropertyList怎么用?Python Command.setPropertyList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Command.Command
的用法示例。
在下文中一共展示了Command.setPropertyList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: checkSyntax
# 需要导入模块: from Command import Command [as 别名]
# 或者: from Command.Command import setPropertyList [as 别名]
def checkSyntax(self):
test = self.getInput().strip()
if (test[0] == '{') and (test[len(test)-1] == '}'):
c = Command(test[1:len(test)-1],self) #supposed to put though everything between {}
c.setSyntaxOnly(self.syntax_only)
if not self.syntax_only:
c.setPropertyList(self.property_list) #commands should get access to all already existing propertylists?
if c.checkSyntax():
if not self.syntax_only:
cList = c.getPropertyList().getDict()
sList = self.property_list.getDict()
sList.update(cList)
return True
else:
return False
else:
print "The first symbol (currently '" + test[0] + ("') needs to be '{' and the last symbol "
"(currently '") + test[len(test)-1] + "') needs to be '}'. Therefore the block is not valid."
return False