[Python-bugs-list] [ python-Bugs-424002 ] sys.executable not reliable

noreply@sourceforge.net noreply@sourceforge.net
Fri, 28 Sep 2001 13:00:53 -0700


Bugs item #424002, was opened at 2001-05-14 11:17
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=424002&group_id=5470

Category: Python Library
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Evan Simpson (evansimpson)
Assigned to: Guido van Rossum (gvanrossum)
Summary: sys.executable not reliable

Initial Comment:
I created a file test.py containing:

#!/usr/local/bin/python2.1
import sys
print sys.executable

When I run it using the command 
line "/usr/local/bin/python2.1 test.py", it prints the 
full path to the executable.  When I run it 
from "/usr/local", using "bin/python2.1 test.py", then 
I get "bin/python2.1".  When I run it 
using "./test.py", I get a blank string.

Under version 1.5.2, all of these yielded the full 
path to the executable.

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

>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-09-28 13:00

Message:
Logged In: YES 
user_id=6380

I think I've fixed this in CVS now (post-2.2a4).

Can you test this with the new CVS?

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

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-09-05 12:06

Message:
Logged In: YES 
user_id=6380

Curious. I'll look into this.

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

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