[Python-Dev] IDLE reading IDLESTARTUP or PYTHONSTARTUP on restart

Mitchell L Model MLMLists at Comcast.net
Wed Feb 11 19:45:14 CET 2009


I have a patch for IDLE, but I've never submitted a patch before and 
not quite sure of the procedure, despite reading the guidelines at 
http://www.python.org/dev/patches/. But I'll be brave and persevere. 
The question I have at the moment is should I only submit the patch 
vs. 3.1 or also for 3.0? 2.7? 2.6? 2.5?

The main thing the patch does is:
	modify the subprocess restart procedure so that it reloads 
whatever file, if any, was loaded when IDLE first started and looked 
for IDLESTARTUP then PYTHONSTARTUP environment variables.

In addition:
	a -q option is added for starting IDLE on the command line to 
mean "quiet", as with Emacs, e.g., to suppress loading of IDLESTARTUP 
or PYTHONSTARTUP
	The former effect of -s would now be the default, which is 
desirable so double-clicking an IDLE icon to start it will cause the 
startup file to run.
	-s is changed to take an argument that is an alternate 
startup file to use

I am a bit concerned about changing -s to have a different meaning. 
Perhaps it's better to leave -s as an option that is simplhy 
superfluous and use a different letter for the alternate startup.

Guidance on all of these would be greatly appreciated. The patch 
itself disturbs things in a half-dozen places, but in very minimal 
ways, so it's not quite as easy as saying "add these three lines over 
here". (It was that simple until I started thinking about whether the 
restart should search for IDLESTARTUP/PYTHONSTARTUP again, and 
perhaps encounter a different file than IDLE did on startup [I think 
it shouldn't, but it's not a big deal either way] and if shouldn't, 
then whatever path was originally found has to be stored somewhere 
and used later. That led to the thinking behind the changes to the 
startup switches.



More information about the Python-Dev mailing list