Finding out that Python is in interactive mode in

Syver Enstad syver-en+usenet at
Sat Dec 29 10:12:47 EST 2001

Joonas Paalasmaa <joonas at> writes:

> How can I find out that Python is started in interactive mode in
> ?
> The need for that information is, that I want that certain
> customizations take place only at
> interactive mode.

If you just need special setup for interactive mode you could do as I
do and define the environment variable PYTHONSTARTUP to some python
file. The file refered to will be executed only when you're starting
python interactively.


Vennlig hilsen 

Syver Enstad

More information about the Python-list mailing list