1.1 --- a/test.py Sun May 31 18:44:40 2009 +0200
1.2 +++ b/test.py Mon Jun 01 02:41:57 2009 +0200
1.3 @@ -1,6 +1,6 @@
1.4 #!/usr/bin/env python
1.5
1.6 -import micropython
1.7 +import micropython.cmd
1.8 from micropython.graph import get_graph
1.9 import rsvp
1.10 import sys
1.11 @@ -20,23 +20,6 @@
1.12 for name, attr in obj.items():
1.13 print name, attr
1.14
1.15 -# Command option processing.
1.16 -
1.17 -def parse_optimisations(args):
1.18 -
1.19 - "Parse 'args' for optimisation flags."
1.20 -
1.21 - if "-omax" in args:
1.22 - requested_optimisations = micropython.Program.supported_optimisations
1.23 - else:
1.24 - requested_optimisations = []
1.25 - for arg in args:
1.26 - if arg.startswith("-o"):
1.27 - for arg_part in arg[2:].split(","):
1.28 - requested_optimisations.append(arg_part)
1.29 -
1.30 - return requested_optimisations
1.31 -
1.32 # Main program.
1.33
1.34 if __name__ == "__main__":
1.35 @@ -49,12 +32,10 @@
1.36 else:
1.37 filename = None
1.38
1.39 - requested_optimisations = parse_optimisations(args)
1.40 -
1.41 # Make the program.
1.42
1.43 try:
1.44 - p = micropython.program(filename, path, requested_optimisations, "-v" in args)
1.45 + p = micropython.cmd.get_program(filename, path, args)
1.46 if filename is None:
1.47 print "Loading module micropython ..."
1.48 m = p.get_importer().load("micropython")