[Python-bugs-list] [ python-Bugs-410274 ] sys.prefix isn't always set

noreply@sourceforge.net noreply@sourceforge.net
Wed, 21 Mar 2001 10:19:30 -0800


Bugs item #410274, was updated on 2001-03-21 01:58
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=410274&group_id=5470

Category: Python Interpreter Core
Group: Platform-specific
Status: Open
>Priority: 6
Submitted By: Fredrik Lundh (effbot)
Assigned to: Mark Hammond (mhammond)
Summary: sys.prefix isn't always set

Initial Comment:
(2.0 and earlier, Windows only)

it looks like sys.prefix isn't set unless

1) PYTHONHOME is set (either via an environment 
variable, or via a call to Py_SetPythonHome), or

2) lib/os.py (or lib/string.py, in 1.5.2) can be found 
somewhere between the directory your executable is 
found in, and the root.

if neither is set, the path is taken from the 
registry, but sys.prefix is left blank, and code 
depending on sys.prefix (e.g. FixTk.py) no longer 
works.

</F>


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

>Comment By: Tim Peters (tim_one)
Date: 2001-03-21 10:19

Message:
Logged In: YES 
user_id=31435

Boosted priority a notch.  Mark, is this intentional or a 
bug?  You're a bit overdue in writing up the intended rules 
for Windows, and I'm very reluctant to go changing things 
like this myself in the absence of clarity.

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

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