本文整理汇总了Python中program.Program.processOptions方法的典型用法代码示例。如果您正苦于以下问题:Python Program.processOptions方法的具体用法?Python Program.processOptions怎么用?Python Program.processOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类program.Program
的用法示例。
在下文中一共展示了Program.processOptions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Program
# 需要导入模块: from program import Program [as 别名]
# 或者: from program.Program import processOptions [as 别名]
result = True
return result
#### -------------- MAIN start ----------------####
# create the program processor. This
# 1. accepts and process the command line options
# 2. creates XML processing engine, that in turn
# a) validates the XML file
# b) extracts the DOM object tree
# c) populates the GINI network class library
# d) performs some semantic/syntax checkings on
# the extracted specification
myProg = Program(sys.argv[0], SRC_FILENAME)
if (not myProg.processOptions(sys.argv[1:])):
sys.exit(1)
options = myProg.options
# set the UML directory if is not given via -u option
if (not options.umlDir):
# set it to the directory pointed by the $UML_DIR env
# if no such env variable, set the uml dir to curr dir
if (os.environ.has_key("UML_DIR")):
options.umlDir = os.environ["UML_DIR"]
else:
options.umlDir = "."
# get the binaries
binDir = options.binDir
if (binDir):