[Python-Dev] patch to make IDLE load IDLESTARTUP/PYTHONSTARTUP on restart (original) (raw)

Mitchell L Model MLMLists at Comcast.net
Thu Feb 12 23:36:06 CET 2009


I have submitted patches to idlelib/PyShell.py for Python 2.7 (Issue 5233) and 3.1 (5234), made against local repository copies as updated an hour ago. The purpose of the patch is to have IDLE load IDLESTARTUP or PYTHONSTARTUP on restart.

Along the way I also made -s the default so IDLESTARTUP or PYTHONSTARTUP gets loaded when IDLE is started by double-clicking rather than from the command line (no reasonable way for the user to get the -s switch into IDLE.app on the Mac). I decided that on restart IDLE should load the file that was loaded when it started in the first place, on the off chance that something had changed in the interim.

I changed the meaning of the -s switch to take an argument that is an alternate startup file to load instead of IDLESTARTUP or PYTHONSTARTUP. It might be better, though, to leave -s as it is and mark it deprecated or obsolete or the default or whatever and use a different letter to specify a load file.

I added a switch -q to suppress loading of the startup file.



More information about the Python-Dev mailing list