How to handle errors?
John Gordon
gordon at panix.com
Sat Oct 22 11:01:46 EDT 2016
In <D42dnWsQ_pa11pfFnZ2dnUU7-bednZ2d at giganews.com> Wildman <best_lay at yahoo.com> writes:
> > Another serious problem with using env in the hash-bang line is that you
> > cannot pass commandline options to the Python executable.
> Not true. I made a test script with this code:
> #!/usr/bin/env python
> import sys
> print sys.argv
> Then I ran it:
> ~$ python test.py argument1 argument2
> ['test.py', 'argument1', 'argument2']
Options cannot be passed *on the hash-bang line*.
--
John Gordon A is for Amy, who fell down the stairs
gordon at panix.com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"
More information about the Python-list
mailing list