[Idle-dev] Startup Shell Functionality

Guido van Rossum guido@digicool.com
Mon, 16 Jul 2001 09:46:41 -0400


> I added a new script, "idles", which causes a Python Shell to open
> instead of the default editor window you get when you use "idle".

Hm, the 'idles' script references a package 'idlelib' so it can't be
run from within the idle source directory.

> <idle>            opens an empty editor window
> <idle foo.py>     opens an editor window for foo.py
> <idles>           opens a shell
> <idles -e foo.py> opens a shell and an editor window for foo.py
> <idles foo.py>    executes foo.py in shell before printing prompt
> 
> The last behaviour is questionable, per GvR. 
> 
> Should it exit, or edit foo.py?
> 
> It may be that a better name than "idles" can be found.  I chose that because
> it was short.  Suggestions welcomed!

I would merge it back idle.py as a separate command line option.

Also note that the usage message printed by idle.py now lies about -e.

My proposal:

idle -i		open a shell
idle file	edit file
idle -i file	open a shell and edit file
idle -r file	run file

I would like the output window from F5 to be the shell, so that you
can examine the globals in the shell.  (This is effectively what
TeachScheme does.)

--Guido van Rossum (home page: http://www.python.org/~guido/)