How to clean python interpreter's environment?

Peter Hansen peter at engcorp.com
Fri Aug 20 14:10:25 EDT 2004


Rafal Kleger-Rudomin wrote:
> I'm looking for a command to reset interpreter's environment i.e. unload 
> all modules, delete variables etc.

If you're in the interactive interpreter, you should use
the following command: ^Z (on Windows), or ^D (Linux).

(Translation: there's no existing command that does what
you want.  Maybe describing your reason for wanting this will
let people suggest alternative solutions.)

-Peter



More information about the Python-list mailing list