1.1 --- a/micropython/cmd.py Wed Mar 03 00:26:00 2010 +0100
1.2 +++ b/micropython/cmd.py Sun Mar 07 01:49:29 2010 +0100
1.3 @@ -43,33 +43,29 @@
1.4
1.5 return ",".join(micropython.Program.supported_optimisations)
1.6
1.7 -def program(filename, path, requested_optimisations, verbose=0):
1.8 +def program(path, requested_optimisations, verbose=0):
1.9
1.10 """
1.11 - Return the program object for the program specified by the given 'filename',
1.12 - module search 'path' and 'requested_optimisations'.
1.13 + Return a program object for the given module search 'path' and
1.14 + 'requested_optimisations'.
1.15 """
1.16
1.17 i = micropython.Importer(path, verbose, requested_optimisations)
1.18 p = micropython.Program(i, requested_optimisations)
1.19
1.20 i.load_from_file("lib/builtins.py", "__builtins__")
1.21 -
1.22 - if filename is not None:
1.23 - i.load_from_file(filename)
1.24 -
1.25 return p
1.26
1.27 # Convenience functions.
1.28
1.29 -def get_program(filename, path, args):
1.30 +def get_program(path, args):
1.31
1.32 """
1.33 - Return the program object for the program specified by the given 'filename',
1.34 - module search 'path' and command 'args'.
1.35 + Return the program object for the given module search 'path' and command
1.36 + 'args'.
1.37 """
1.38
1.39 requested_optimisations = parse_optimisations(args)
1.40 - return program(filename, path, requested_optimisations, "-v" in args)
1.41 + return program(path, requested_optimisations, "-v" in args)
1.42
1.43 # vim: tabstop=4 expandtab shiftwidth=4