[Python-bugs-list] [ python-Bugs-546913 ] #!/usr/bin/python -u -E doesn't work.

noreply@sourceforge.net noreply@sourceforge.net
Sun, 21 Apr 2002 16:46:14 -0700


Bugs item #546913, was opened at 2002-04-21 23:46
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=546913&group_id=5470

Category: Python Interpreter Core
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Rob Landley (landley)
Assigned to: Nobody/Anonymous (nobody)
Summary: #!/usr/bin/python -u -E doesn't work.

Initial Comment:
In linux create an executable file.py with the first 
line:

#!/usr/bin/python -u -E

It doesn't matter WHAT the rest of the file is, it 
won't work.

If you feed it both of those arguments, the python 
interpreter complalins that "-" is an unknown 
argument. (?)  I tried replacing python with "echo" 
and the command line it was getting was "-u -E 
./file.py", and "python -u -E ./file.py" works just 
fine when I feed that to python from an interactive 
bash command line.

Feeding it just "-E" in the #! arguments works fine, 
but you can't combine select.poll with file.read(), 
and without -u, if you combine os.read() with 
file.readline() it takes a 4k chunk out of stdin that 
you can't get it to cough back up with a crowbar...

I'm using python 2.2 compiled from source on an 
approximately Red Hat 7.2 system, if that makes a 
difference.  (I checked the ancient python 1.5 that 
comes with Red Hat and yup: same bug.)

I am about to go create a bash script for the purpose 
of calling the python program in such a way as to not 
trigger this bug...

Rob


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=546913&group_id=5470