loading files to the interpreter
Bjorn Pettersen
bjorn at roguewave.com
Mon Aug 7 15:43:40 EDT 2000
Riku Voipio wrote:
>
> In article <8mn1fj$r83$1 at tron.sci.fi>, "Riku Voipio"
> <riku.voipio at nospam.iki.fi.invalid> wrote:
> > It would be a lot easier, if I could just type in the interpreter
> > something like
> >
> >>>load("~/programming/foo.py")
> >
> > instead of copying the whole file (which can be very long). is there a
> > way to load code in the "fly"?
>
> Blah, I just found a solution after returing to the python language reference:
>
> >>> execfile
> <built-in function execfile>
Normally you would do
import foo
and
reload(foo)
but I'm not quite sure which semantics you're looking for..
-- bjorn
More information about the Python-list
mailing list