1.1 --- a/test.py Mon Mar 31 00:54:03 2008 +0200
1.2 +++ b/test.py Sun Apr 06 02:53:43 2008 +0200
1.3 @@ -13,12 +13,17 @@
1.4 print name, attr
1.5
1.6 if __name__ == "__main__":
1.7 - requested_optimisations = []
1.8 - for arg in sys.argv[2:]:
1.9 - if arg.startswith("-o"):
1.10 - requested_optimisations.append(arg[2:])
1.11 + args = sys.argv[2:]
1.12 + i = micropython.Importer(sys.path, "-v" in args)
1.13
1.14 - i = micropython.Importer(sys.path, "-v" in sys.argv)
1.15 + if "-omax" in args:
1.16 + requested_optimisations = i.supported_optimisations
1.17 + else:
1.18 + requested_optimisations = []
1.19 + for arg in args:
1.20 + if arg.startswith("-o"):
1.21 + requested_optimisations.append(arg[2:])
1.22 +
1.23 try:
1.24 builtins = i.load_from_file("lib/builtins.py", "__builtins__")
1.25 if len(sys.argv) < 2: