[EMAIL PROTECTED] wrote: > Is there a reliable way (this is on Solaris if that matters) to tell if > I'm > running in the interactive interpreter as opposed to in a script? I think > examining sys.argv works, but wanted to double check.
hasattr(sys, "ps1") http://www.python.org/doc/2.5.2/lib/module-sys.html#l2h-5167 """ ps1 ps2 Strings specifying the primary and secondary prompt of the interpreter. These are only defined if the interpreter is in interactive mode. """ -- http://mail.python.org/mailman/listinfo/python-list