Hello, searched all over but no success. I want to have a script
output HTML if run in a browser and plain text if run in a Terminal.
In Python 2, I just said this:

if len(sys.argv)==True:

and it seemed to work. Py3 must have broken that by sending a list
with the path to the script in BOTH the browser and Terminal. Is there
some newfangled way to determine what is running the script (hopefully
without a try wrapper)?

-- Gnarlie
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to