[Idle-dev] A suggestion to IDLE (A wish from a Unix user)

Kurt B. Kaiser kbk@shore.net
Thu, 16 Jan 2003 14:01:33 -0500


Aki Niimura <akineko@pacbell.net> writes:

> However, I have one big complaint that IDLE doesn't have a way
> to reload (or refresh) the loaded file contents unless I close
> the IDLE windows and start over.
>
> The way I'm debugging the program is:
> (1) write a program in Unix using my favourite editor
>
> (2) open the file with IDLE in Windows
>   - the file is shared between the platforms using Samba
>
> (3) update the file in Unix
>
> (4) try again in Windows
>   - currently I need to close the IDLE and start over
>
> //
>
> It would be very nice if the future IDLE has a way to refresh the 
> file being loaded.  (I'm using IDLE 0.8)

I recommend that you try IDLEfork, which will soon be the new Python IDLE.

http://sourceforge.net/projects/idlefork/

If you open a file in an Edit window, every time you hit F5 it will be
re-run in a fresh environment (which is a subprocess independent of 
IDLEfork itself).   Modification by an external editor works correctly,
and you will get the result of a fresh start of the current program, even
if the module edited is two or three steps down an import chain. 

As far as viewing the updated source file (the above method will not
change the source in the Edit window), it is not necessary to restart
IDLEfork after an external change.  Simply close the Edit window and
re-open it.  This is much more convenient now that we have a Recent
Files feature on the File menu.  

It would be possible to implement a feature whereby the Edit window
would be updated at F5 time if the file on disk was newer.  If I get
enough call for it, maybe it will happen.  An RFE on IDLEfork would
help me not to forget!

Or, you could submit a patch!  :-) :-)

Of course, we want to wean you from your "favorite" editor.  IDLE has
advantages for Python coding that other editors do not.  Try IDLEfork
and let us know how it works out and why you still prefer your
favorite editor.

--
KBK