Forgetting an import

Yongjian Xu jimxu at google.com
Tue Jun 12 14:13:31 EDT 2007


ipython supports deepreload which will recompile the bytecode from the file
no matter what. You can set the option up in ipython and use it. It requires
no exit to the current env.

Jim

On 6/12/07, Larry Bates <larry.bates at websafe.com> wrote:
>
> HMS Surprise wrote:
> > I imported a set of functions from a file I wrote to interpreter
> > shell:
> >
> > from myFile import *
> >
> > Now if I change functions in this file how can I make python forget it
> > so I can force a fresh import?
> >
> > thanx,
> >
> > jh
> >
> While there may be ways of doing this, I have found that you are much
> better off opening another window and run your script from the bare
> OS.  It will help you catch problems that you may miss in the
> interpreter shell.  It also solves this problem completely.
>
> -Larry
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
Yongjian (Jim) Xu
===========
Sysops
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070612/55063bd1/attachment.html>


More information about the Python-list mailing list