473,396 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Python25.zip

As part of the Python initialization, C:\Windows\System32\Python25.zip
is set up in the path.

I haven't seen any documentation on the use or purpose of the zip file.

Colin W.

Nov 30 '06 #1
3 2797
Dennis Lee Bieber wrote:
On Thu, 30 Nov 2006 18:14:11 -0500, "Colin J. Williams"
<cj*@sympatico.cadeclaimed the following in comp.lang.python:
>As part of the Python initialization, C:\Windows\System32\Python25.zip
is set up in the path.

I haven't seen any documentation on the use or purpose of the zip file.
Well, did you examine the contents of it?
There is no such file in C:\Windows\System32 - Python 2.5 on a Windows XP
>
I believe for some versions now, "import" can pull from a ZIP
archive -- perhaps they've put the many standard library imports into a
single file...
Yes, since 2.3 - thanks to Fredrick for the pointer to PEP 273. That
gives the helpful warning that the above should follow the home
directory in the path list.

PEP 302 says "[PYTHONPATH] is directly needed for Zip imports."

The role of Python25.zip is not clear. Is it required in the path just
to enable the import X.zip capability?

Colin W.

Dec 1 '06 #2
Colin J. Williams wrote:
Dennis Lee Bieber wrote:
>On Thu, 30 Nov 2006 18:14:11 -0500, "Colin J. Williams"
<cj*@sympatico.cadeclaimed the following in comp.lang.python:
>>As part of the Python initialization, C:\Windows\System32\Python25.zip
is set up in the path.

I haven't seen any documentation on the use or purpose of the zip file.
Well, did you examine the contents of it?
There is no such file in C:\Windows\System32 - Python 2.5 on a Windows XP
>>
I believe for some versions now, "import" can pull from a ZIP
archive -- perhaps they've put the many standard library imports into a
single file...
Yes, since 2.3 - thanks to Fredrick for the pointer to PEP 273. That
gives the helpful warning that the above should follow the home
directory in the path list.

PEP 302 says "[PYTHONPATH] is directly needed for Zip imports."

The role of Python25.zip is not clear. Is it required in the path just
to enable the import X.zip capability?
No. It's there just *in case* you have a Python25.zip lying around containing
the library. By default, it isn't.

Georg
Dec 2 '06 #3
Colin J. Williams schrieb:
The role of Python25.zip is not clear. Is it required in the path just
to enable the import X.zip capability?
To rephrase Georg's explanation: it allows Python distributors (e.g.
Linux distributors, or ActiveState) to put all of the Python library
(including site.py) into a single zip file, instead of requiring a
Lib directory with many files in it. E.g. on Windows, a complete
Python installation could consist of three files: python.exe,
python25.dll, and python25.zip.

To make that possible, you can't tell people that they have to edit
site.py to put a zip file on sys.path, instead, the distributed
interpreter must already look for a file even though this file
will usually not be present.

Regards,
Martin
Dec 2 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: ebzzry | last post by:
I'm trying to run an application and I got this: % meld Traceback (most recent call last): File "/usr/local/bin/meld", line 73, in <module> pygtk.require("2.0") File...
0
by: Fredrik Lundh | last post by:
Robert Dailey wrote: off the top of my head: - python25.dll (from \windows\system32, usually) - any extension PYD:s and DLL:s you're using (from \python25\DLLs) - either the contents of...
4
by: Colin J. Williams | last post by:
Is _checkversion.py used at all currently? Colin W.
2
by: WilliamWallace | last post by:
Hi, I'm pretty new to Python, and brand new to PAMIE, and I'm out of ideas on what to try on this. I'm running a simple test script to go to google, type something in the search box and search...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.