simplify

Annotated test.py

254:60a816e55966
2007-06-24 paulb Updated copyright information.
paulb@57 1
#!/usr/bin/env python
paulb@57 2
paulb@176 3
if __name__ == "__main__":
paulb@176 4
    import sys, os
paulb@185 5
    sys.setrecursionlimit(10000)
paulb@176 6
paulb@221 7
    from simplify import simplified
paulb@19 8
paulb@176 9
    if "-s" in sys.argv:
paulb@176 10
        simplified.set_single_instance_mode()
paulb@176 11
    elif "-m" in sys.argv:
paulb@176 12
        simplified.set_multiple_instance_mode()
paulb@198 13
    elif "-ms" in sys.argv:
paulb@198 14
        simplified.set_selective_multiple_instance_mode()
paulb@204 15
    elif "-mp" in sys.argv:
paulb@204 16
        simplified.set_prolific_multiple_instance_mode()
paulb@176 17
paulb@221 18
    import simplify.viewer
paulb@249 19
    from simplify import Importer
paulb@138 20
paulb@249 21
    importer = Importer(sys.path, "-na" not in sys.argv)
paulb@249 22
    builtins = importer.load_from_file(os.path.join("lib", "builtins.py"))
paulb@249 23
    module = importer.load_from_file(sys.argv[1], builtins)
paulb@249 24
    if "-i" in sys.argv:
paulb@249 25
        importer.fix_instances()
paulb@249 26
    if "-d" in sys.argv:
paulb@249 27
        simplify.viewer.makedocs(sys.argv[1], importer.get_modules(), distinct=("-i" in sys.argv))
paulb@138 28
paulb@57 29
# vim: tabstop=4 expandtab shiftwidth=4