Newbie: How do you "clear" PythonWin between runs?

Dave Abrahams abrahams at mediaone.net
Sun Jun 27 13:44:59 EDT 1999


In article <37700E61.5388E101 at alliedsignal.com> , "H. P. Friedrichs" <" 
HPeter.Friedrichs"@alliedsignal.com> wrote:

> So, my question is this: How can I "flush" or "clear" the python
> interpreter between successive runs? Is there a command I can add to my
> script to initialize python before running the script?

I haven't tried it yet, but I've been thinking:

# when you start up the IDE
import sys
modules = sys.modules.copy()

# To "clear" the python interpreter
sys.modules = modules.copy()


Just might work,
Dave




More information about the Python-list mailing list