Finding out that Python is in interactive mode in sitecustomize.py

Joseph A Knapka jknapka at earthlink.net
Thu Dec 27 23:29:20 CET 2001


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

I want to know the answer to this as well. My reason is, I
want the Anygui curses binding to disable itself if it
finds that it's being imported from an interactive shell,
since this has, er, unfortunate side effects.

FAQ-reading and random flailing about with my Wand of Google
have not been productive thus far...

Cheers,

-- Joe
"I should like to close this book by sticking out any part of my neck
 which is not yet exposed, and making a few predictions about how the
 problem of quantum gravity will in the end be solved."
 --- Physicist Lee Smolin, "Three Roads to Quantum Gravity"



More information about the Python-list mailing list