[Idle-dev] idle, idlefork not running PYTHONSTARTUP

Guido van Rossum guido@python.org
Sun, 12 Jan 2003 21:32:16 -0500


> python v2.2.2b1
> idle v0.8
> idlefork v0.9a1
> linux kernel v2.4.18
> 
> When I run idle or idlefork with the '-s' option, it appears that my
> PYTHONSTARTUP script isn't being run:  nothing I type in the Python
> Shell gets appended to my .pyhistory file.  When I run python in an
> xterm the history works as expected.  My .bash_profile has entries for
> both PYTHONSTARTUP and IDLESTARTUP and I know these are getting
> exported:
> 
> $ env | grep STARTUP
> IDLESTARTUP=/home/norvell/.pystartup
> PYTHONSTARTUP=/home/norvell/.pystartup
> 
> The contents of my .pystartup are copied and pasted from the Python tutorial
> at:
> 
> http://www.python.org/doc/current/tut/node13.html
> 
> Also, typing in the contents of .pystartup manually in the idle Python
> Shell doesn't seem to work either.

What's done there only works with programs using GNU readline.  IDLE
has its own history implementation which has never heard of readline.

If you want such a feature, the best thing is to download the IDLEfork
alpha from idlefork.zope.org and produce a patch, and then upload it
to the IDLEfork SF patch manager.

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