Redundant elements in sys.path

Dennis E. Hamilton infonuovo at email.com
Tue Feb 8 10:46:26 EST 2000


I have noticed the same thing with the python 1.5.2 for Win32 distribution,
without PythonWin installed.  This shows up on Windows 98 and Windows 98 SE,
although I thought I noticed more capitalization variations.  It appears to
be an artifact of the installation process that appears harmless although a
bit distracting when I look at it.
	My hypothesis is that it may also be a redundancy resulting from capturing
the Fat32 long file names as well as the underlying DOS forms of the file
names, with no filtering for duplicates.  (Do those even make sense on NT?
Does PROGRA~1 correspond to anything on your system?)

Related install question: Do you have Tcl-Tk installed as part of python
1.5.2 for Win32?  I noticed that on WIn98 there is a registry error (bad
path to a Tcl-Tk library module) in that install.  I reported it to the
Tcl-Tk folk and they said it doesn't show up in the Win32 installer for
Tck-Tk versions later than the one packaged inside python 1.5.2.  I mention
it now here before I forget one more time.

-- orcmid

-----Original Message-----
From: python-list-admin at python.org
[mailto:python-list-admin at python.org]On Behalf Of Steve Holden
Sent: Tuesday, February 08, 2000 07:06
To: python-list at python.org
Subject: Redundant elements in sys.path


I noticed that both PythonWin and Idle have the same items, although
with different case representations, in sys.path.  Since the filestore
isn't case-sensitive on Windows NT I'm wondering

	a) How these duplicates came about (multiple installs?), and
	b) What I can do to get rid of them (registry scoured, but
		nothing probable found).

The code I used to detect this situation is no great shakes:

>>> s=list(sys.path)
>>> s.sort()
>>> for p in s:
...	print p

Output from PythonWin:

C:\Program Files\Python
C:\Program Files\Python\DLLs
C:\Program Files\Python\DLLs
C:\Program Files\Python\Lib
C:\Program Files\Python\Lib\lib-tk
C:\Program Files\Python\Lib\plat-win
C:\Program Files\Python\Pythonwin
C:\Program Files\Python\Pythonwin
C:\Program Files\Python\lib
C:\Program Files\Python\lib\lib-tk
C:\Program Files\Python\lib\plat-win
C:\Program Files\Python\win32
C:\Program Files\Python\win32\lib

Output from Idle:

C:\PROGRA~1\PYTHON
C:\PROGRA~1\Python\Tools\idle
C:\Program Files\Python
C:\Program Files\Python
C:\Program Files\Python\DLLs
C:\Program Files\Python\DLLs
C:\Program Files\Python\Lib
C:\Program Files\Python\Lib\lib-tk
C:\Program Files\Python\Lib\plat-win
C:\Program Files\Python\Pythonwin
C:\Program Files\Python\lib
C:\Program Files\Python\lib\lib-tk
C:\Program Files\Python\lib\plat-win
C:\Program Files\Python\win32
C:\Program Files\Python\win32\lib

Since I'm not running from source distribution I'd appreciate it
if someone could explain how PYTHONPATH is initialized and how I
can simplify my environment to remove this duplication.

regards
Steve Holden
--
"If computing ever stops being fun, I'll stop doing it"
--
http://www.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list