1.1 --- a/test.py Wed Mar 03 00:26:00 2010 +0100
1.2 +++ b/test.py Sun Mar 07 01:49:29 2010 +0100
1.3 @@ -40,12 +40,15 @@
1.4 # Load the program.
1.5
1.6 try:
1.7 - p = micropython.cmd.get_program(filename, path, args)
1.8 + p = micropython.cmd.get_program(path, args)
1.9 + i = p.get_importer()
1.10 +
1.11 if filename is None:
1.12 print "Loading module micropython ..."
1.13 - m = p.get_importer().load("micropython")
1.14 + m = i.load("micropython")
1.15 else:
1.16 - m = p.get_importer().get_module("__main__")
1.17 + print "Loading from", filename, "..."
1.18 + m = i.load_from_file(filename)
1.19
1.20 # Build the program.
1.21
1.22 @@ -60,7 +63,6 @@
1.23
1.24 ot = p.get_object_table()
1.25 pt = p.get_parameter_table()
1.26 - i = p.get_importer()
1.27
1.28 print "Object table: ot = %r" % ot
1.29 print "Parameter table: pt = %r" % pt