当前位置: 首页>>代码示例>>Python>>正文


Python Configuration.filedump方法代码示例

本文整理汇总了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)
开发者ID:laforest,项目名称:Octavo,代码行数:32,代码来源:Assembler.py


注:本文中的Configuration.Configuration.filedump方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。