[Tutor] (no subject)

Michael Lange klappnase at freenet.de
Sun Mar 21 21:18:05 EST 2004

On Tue, 16 Mar 2004 14:23:20 -0800 (PST)
Jeff Peery <jeffpeery at yahoo.com> wrote:

> is there a general clear everything function - other than "del" which I think only works one variable at a time? I've used matlab and there is a function "clear" that I like to call at the beginning of my scripts.  My problem is that sometimes in python I make changes to my script and I run it and the changes don't appear, python runs the old version.  I'm saving all my scripts before I run them, but I still don't see python using my latest save. I thought that if there was a way to clear the variable list that that would solve my problem. Sometimes I have to close python IDLE and reopen it to get it to run my last save. 
> I also noticed that python might be running off the *.pyc document and not the script itself, is there a way to prevent the *.pyc from being created? 
> thanks!
> Jeff

Hi Jeff,

This sounds like you are using IDLE-0.8 from a Python-2.2 install. With IDLE-1.0 that comes with Python-2.3
this problem has been fixed, when you run your scripts the PythonShell gets automatically restarted.
If you don't want to upgrade the whole Python installation, you might have a look at Idlefork
( I think at <http://idlefork.sourceforge.net> ) which used to be an extended version of IDLE (and now
actually *is* IDLE I think); they have a version there that runs with Python-2.2 and has this feature
already included.

I hope this helps


More information about the Tutor mailing list