How to tell in site.py if python is being invoked interactively?
Randall Hopper
aa8vb at yahoo.com
Wed Mar 29 19:40:24 EST 2000
Alex:
|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
/path/to/my/message/file:
print "For all your Python needs, call 123-1212."
|Alex <alex at somewhere.round.here>
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 rahul.net".
--
Randall Hopper
aa8vb at yahoo.com
More information about the Python-list
mailing list