working on multiple files in IDLE

Fuzzyman michael at foord.net
Fri Jan 16 03:44:32 EST 2004


"Moosebumps" <crap at crud.com> wrote in message news:<ceJNb.1610$Z6.646 at newssvr29.news.prodigy.com>...
> So say I am working on two separate .py files in IDLE that are part of the
> same program.  Does anyone have problems where when you modify one file, and
> then run the other, the changes you made in the first aren't updated?
> 
> I usually just close all the files, and restart IDLE, but this is a pain.
> Maybe because I always use right click -> edit with IDLE (on Windows).  That
> starts up a separate Python Shell too, which I always close.
> 
> MB

The latest version of IDLE was *supposed* to fix this by restarting
the IDLE session when you run the script.
Unfortunately they didn't get it working on the windows version
because it uses the same socket when you run multiple
versions......... The result is that IDLE is virtually unuseable for
serious work on windows... :-(

There *is* a way round it...... If you edit your file association for
.py and .pyw files (from an explorer window menu select tools and
folder options - then choose file types). Remove the -n from the
command line that IDLE is launched with.. this allows IDLE to be
launched with a subprocess... *HOWEVER* if you do this you can only
open one version of IDLE at a time the second and third
modules/scripts that you edit must be opened using the 'open' or 'open
module' option..... If a second shell window opens it will
hang.........

I have two file associations - one 'Edit with IDLE Subprocess' and one
'Edit with IDLE No Subprocess'... the two co-exist quite happily even
when run simultaneously...........


For files edited on IDLE *with* a subprocess - it will restart the
session whenever you run the script...... which re-imports all the
modules and therefore includes your changes..... bit of a bodge
though....

Fuzzy



More information about the Python-list mailing list