[Tutor] Re: sys.path

Lee Harr missive@hotmail.com
Wed Aug 6 13:54:02 EDT 2003


>        I'm just curious if anyone else has noticed this in Python 2.3 
>under
>Windows (2000). This may have been there in 2.2 and I just didn't notice
>it:
>
>>>>import sys, os
>>>>for path in sys.path:
>        if not os.path.exists(path):
>                print path
>
>C:\WINNT\system32\python23.zip
>C:\Python23\lib\plat-win
>>>>
>
>What are these and if they do not exist why are they in sys.path? Anyone
>know? Just curious..no big deal:)
>


Importing from zip files is new in 2.3.  I think it makes it easier to 
install
python on systems with limited resources (think embedded systems,
PDAs, etc)

I am not sure what plat-win is, but I assume it is platform-specific modules
related to running in windows.  Maybe that folder was there in 2.2 because
you had used it for a while and had installed some things in that folder.
It may get created the first time you try to install there...

I guess the import mechanism is smart enough to just skip over those
elements in sys.path that do not exist.

_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail





More information about the Tutor mailing list