for-loop on cmd-line

Chris Angelico rosuav at gmail.com
Thu Oct 11 12:58:45 EDT 2012


On Fri, Oct 12, 2012 at 3:49 AM, Gisle Vanem <gvanem at broadpark.no> wrote:
> <wxjmfauth at gmail.com> wrote in comp.lang.python
>
> (my ISP no longer updates this group. Last message is from 8. April.
> Does the postings to the python mailing-list automatically get reposted to
> comp.lang.python?)

Yes, c.l.p and python-list mirror each other.

>> C:\Windows\system32\python32.zip
>> c:\python32\DLLs
>
>
> I see a similar result:
>  f:\Windows\system32\python27.zip
>
> Where is it determined that python27.zip should be in sys.path?
> I have no such file anywhere. I'm using ActivePython 2.7.2.

It's in sys.path in the three Windows Pythons I have here:

C:\Documents and Settings\M>python -c "import sys; print(sys.version); print('\n
'.join(sys.path))"
2.4.5 (#1, Jul 22 2011, 02:01:04)
[GCC 4.1.1]

C:\Program Files\LilyPond\usr\lib\python24.zip
C:\Program Files\LilyPond\usr\lib\python2.4
C:\Program Files\LilyPond\usr\lib\python2.4\plat-mingw32
C:\Program Files\LilyPond\usr\lib\python2.4\lib-tk
C:\Program Files\LilyPond\usr\lib\python2.4\lib-dynload
C:\Program Files\LilyPond\usr\lib\python2.4\site-packages

C:\Documents and Settings\M>\python26\python -c "import sys; print(sys.version);
 print('\n'.join(sys.path))"
2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)]

C:\WINDOWS\system32\python26.zip
C:\python26\DLLs
C:\python26\lib
C:\python26\lib\plat-win
C:\python26\lib\lib-tk
C:\python26
C:\python26\lib\site-packages

C:\Documents and Settings\M>\python32\python -c "import sys; print(sys.version);
 print('\n'.join(sys.path))"
3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)]

C:\WINDOWS\system32\python32.zip
C:\python32\DLLs
C:\python32\lib
C:\python32
C:\python32\lib\site-packages
C:\python32\lib\site-packages\win32
C:\python32\lib\site-packages\win32\lib
C:\python32\lib\site-packages\Pythonwin

C:\Documents and Settings\M>

Presumably it's so that I can zip up my entire Python library and toss
it into a convenient file. I don't think it costs much to stat a file
and find it's not there before moving on, so it's not a problem to
leave it there.

ChrisA



More information about the Python-list mailing list