本文整理汇总了Python中Configuration.Configuration.filedump方法的典型用法代码示例。如果您正苦于以下问题:Python Configuration.filedump方法的具体用法?Python Configuration.filedump怎么用?Python Configuration.filedump使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Configuration.Configuration
的用法示例。
在下文中一共展示了Configuration.filedump方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Configuration
# 需要导入模块: from Configuration import Configuration [as 别名]
# 或者: from Configuration.Configuration import filedump [as 别名]
configuration = Configuration()
data = Data(configuration)
code = Code(data, configuration, operators)
commands = Commands(data, code)
parser = Parser(commands)
parser.parse_file(argv[1])
# Won't need these after Parsing and Allocation.
# So let's enforce that for our own discipline.
# State is carried in Code and Data.
del parser
del commands
print("Parsing and Allocation Done")
# Dump initial state of code and data
# immediately after Allocation
configuration.filedump("LOG.allocate")
data.filedump("LOG.allocate", append = True)
code.filedump("LOG.allocate", append = True)
resolver = Resolver(data, code, configuration)
resolver.resolve()
print("Resolution Done")
# Dump state of code and data after Resolution
# use gvimdiff (or your tool of choice) to see the differences
# There should be no remaining strings and unset variables
# or instruction operands at this point.
configuration.filedump("LOG.resolve")
data.filedump("LOG.resolve", append = True)
code.filedump("LOG.resolve", append = True)