How to handle errors?

Wildman best_lay at yahoo.com
Sat Oct 22 13:57:13 EDT 2016


On Sat, 22 Oct 2016 15:01:46 +0000, John Gordon wrote:

> 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*.

OK, I misunderstood Steve's statement.  I stand corrected.

-- 
<Wildman> GNU/Linux user #557453
"Well, that's quite different.  Never mind."
  -Emily Litella



More information about the Python-list mailing list