IDLE question

Claudio Grondi claudio.grondi at freenet.de
Thu Nov 17 05:35:44 EST 2005


<bobueland at yahoo.com> schrieb im Newsbeitrag
news:1132217965.434209.122200 at f14g2000cwb.googlegroups.com...
> IDLE doesn't seem to honor PYTHONSTARTUP environment variable nor
> sitecustomize.py
>
> How do you then customize in IDLE?
>
> (basically I want to execute the statement
>    from btools import *
> each time I restart IDLEs Python Shell)
>
Following works for me:

C:\Python24\pythonw.exe E:\Python24\Lib\idlelib\idle.py -r
E:\Python24\sitecustomize.py

or

C:\Python24\pythonw.exe   E:\Python24\Lib\idlelib\idle.py -c "import os;
from path import path"

content of my sitecustomize.py is:
"
import os
from path import path
"

and both ways of invoking IDLE have the same effect (apparently of faking
execution of not shown input line) of making the modules  os  and the class
path  available at start of IDLE.

My question in this context:
  Can the PyShell.py file in C:\Python24\Lib\idlelib directory be edited
somehow to achieve same effect?

Claudio





More information about the Python-list mailing list