interactive test

mrnolta at my-deja.com mrnolta at my-deja.com
Wed Jan 31 01:06:54 EST 2001


Hi,

What's the appropriate way to test for an
interactive Python session? Right now I'm using:

	if sys.path[0] == '':
		interactive = 1

which works, but it's often screwed up by people
mangling the search path.

I tried testing the Py_InteractiveFlag global, but
that doesn't seem to work.

-Mike Nolta


Sent via Deja.com
http://www.deja.com/



More information about the Python-list mailing list