load .py file in interpreter?

Skip Montanaro skip at mojam.com
Fri Aug 6 12:22:07 EDT 1999

    Joe> Once you're running in the interpreter, how do you load (or
    Joe> re-load) some foo.py Python code into the interpreter? (I'm using
    Joe> JPython, by the way.)


Check out the import statement and the reload function as well as the
execfile function you found.  Both import and reload are used to import (or
reimport) a module into the current namespace.

Skip Montanaro	| http://www.mojam.com/
skip at mojam.com  | http://www.musi-cal.com/~skip/

More information about the Python-list mailing list