FAQ
With a fresh installation of Python 2.3b1 on Windows 2000 (having
'uninstalled' earlier installations).
The c:\python23 is on PATH.

Where does the 'C:\\WINNT\\System32\\python23.zip' come from in sys.path?
Does anyone else get this? Is it meant to be there?

C:\>python
Python 2.3b1 (#40, Apr 25 2003, 19:06:24) [MSC v.1200 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
import sys
sys.path
['', 'C:\\WINNT\\System32\\python23.zip', 'C:\\', 'c:\\python23\\DLLs',
'c:\\python23\\lib', 'c:\\python23\\lib\\plat-win',
'c:\\python23\\lib\\lib-tk',
'c:\\python23', 'c:\\python23\\lib\\site-packages']
>>>

Stephen D Evans

Search Discussions

  • Martin v. Löwis at Apr 29, 2003 at 6:52 pm
    "Stephen D Evans" <sde at recombinant.demon.co.uk> writes:

    Where does the 'C:\\WINNT\\System32\\python23.zip' come from in sys.path?
    Does anyone else get this? Is it meant to be there?
  • Just at May 1, 2003 at 3:02 pm
    In article <3eb1331d$0$21313$afc38c87@>,
    "James C. Ahlstrom" wrote:
    Where does the 'C:\\WINNT\\System32\\python23.zip' come from in sys.path?
    Does anyone else get this? Is it meant to be there?
    It is the default zip file path. It enables you to put modules in a zip
    file and have them imported. A default path entry for zip files is
    necessary so the standard library can be imported from a zip archive.

    Having said that, I don't think it is a good idea to leave the default zip
    file
    on sys.path if the file does not exist. The original site.py had code which
    removed non-existent paths, and apparently that code was removed, or
    does not delete non-existent zip paths.
    Maybe site.py can be made smarter, but the idea is that there may be
    items on sys.path that do not point to items on the file system (eg.
    URLs) yet can be handled by an importer later. IOW, the check was
    removed to generalize the idea that sys.path items are not _necessarily_
    file system paths.

    Just

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedApr 29, '03 at 6:15p
activeMay 1, '03 at 3:02p
posts3
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase