interactive shell -- reload definitions?

Metalone jcb at iteris.com
Tue May 9 17:58:07 EDT 2006


I have a question about the interactive Python shell.  Is it possible
to reload a file and get the new definitions.

For example, if I do
import xyz

Then I find a bug in some function in xyz.
So, I edit xyz.py

I would like to reload the definitions in xyz.py without leaving my
current shell session.
Is this possible?


Also, is there any way to save definitions created in the interactive
shell to a file?
Sometimes I write a simple function in the shell, and this wish I had
that function in an external file.

Thanks.




More information about the Python-list mailing list