The PYTHONSTARTUP environment variable does not work--does not import the indicated startup file--when IDLE is started under Windows. I have tested under Windows XP SP2, and under Windows Vista Ultimate 64 bit. The os.environ variable does list the startup file, but IDLE fails to run it.
Believe it or not, this is the documented behavior of Idle on all platforms. You have to specify -s to have PYTHONSTARTUP run. See the last comment in Issue5594, and also the referenced issue 5233, which has a patch that apparently changes this behavior, although that isn't mentioned in that issue itself. I'm making this a feature request for changing the default behavior, to see what people think.
David, thank you for the research on related issues. #5233 explicitly includes this proposal: "The former effect of -s would now be the default,". So I am closing this as a partial duplicate. I will explain here why I reject this.
type: behavior -> enhancementtitle: PYTHONSTARTUP broken on Windows -> PYTHONSTARTUP is not run by default when Idle is startedcomponents: - Windowsnosy: + r.david.murray, kbkversions: + Python 3.2, - Python 3.1messages: +
2010-04-12 14:13:56
brian.curtin
set
priority: normalnosy: + brian.curtincomponents: + IDLE, Windows