How to tell in if python is being invoked interactively?

Randall Hopper aa8vb at
Thu Mar 30 02:40:24 CEST 2000

 |Hi.  I am setting up python for use by potentially a large number of
 |people.  I would like to set it up so that if it is invoked
 |interactively, a message telling people how to inform me of problems
 |is displayed.  But I don't want that message to be displayed if python
 |is being used to run a program.

Do you have control over the default user shell profiles?:

   setenv PYTHONSTARTUP /path/to/my/message/file

   print "For all your Python needs, call 123-1212."

 |Alex <alex at>

BTW, if you don't want e-mail replies, please set your Mail-Followup-To
header, rather than have everyone who doesn't notice (the bogus address)
deal with a bounce.

Some mailers like Mutt will automagically set this header to the list
address if you so desire.  Alternatively, set it to a discard address like
"null at".

Randall Hopper
aa8vb at

More information about the Python-list mailing list