473,569 Members | 2,761 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

python24.dll and encodings ?

I believe I read in a relatively recent thread that the reason
python24.dll is so large compared to previous releases is that all the
language encodings are linked into the library?

Are there any plans for future releases to split the encodings out so
that, for example, if someone wanted to make a smaller executable using
py2exe without all the language encodings, they could do so?

I suppose one could always compile their own version of the python24.dll
but for those of us that are compiler-challanged, splitting out the
encodings would be nice.

Is that even feasible?
Thanks!
Dec 8 '05 #1
10 1808
Bugs wrote:
I believe I read in a relatively recent thread that the reason
python24.dll is so large compared to previous releases is that all the
language encodings are linked into the library?
Not only that (but also). In addition, it also contains modules that
were previously implemented as separate .pyd files (_csv, _sre,
_symtable, _winreg, datetime, mmap, parser).
Are there any plans for future releases to split the encodings out so
that, for example, if someone wanted to make a smaller executable using
py2exe without all the language encodings, they could do so?
I previously said that I would do such a thing if somebody provided a
specification other than "split out the encodings". I.e. write a PEP
that specifies how to determine whether an extension module should be
included into pythonxy.dll, and when it should not; this specification
should allow to reason about modules that haven't yet been contributed.

The PEP should be accompanied with an implementation, i.e. a set of
patches to PCbuild.

Then, the patch should be discussed, and find support in the community.
I suppose one could always compile their own version of the python24.dll
but for those of us that are compiler-challanged, splitting out the
encodings would be nice.

Is that even feasible?


Technically, yes. However, somebody needs to take the lead.

Regards,
Martin
Dec 8 '05 #2
Martin v. Löwis wrote:
Not only that (but also). In addition, it also contains modules that
were previously implemented as separate .pyd files (_csv, _sre,
_symtable, _winreg, datetime, mmap, parser).
[snip]
I previously said that I would do such a thing if somebody provided a
specification other than "split out the encodings". I.e. write a PEP
that specifies how to determine whether an extension module should be
included into pythonxy.dll, and when it should not; this specification
should allow to reason about modules that haven't yet been contributed.


Thanks Martin! As the python24.dll now contains modules and codecs that
weren't linked into the DLL before 2.4 and as we now need a PEP to have
them split out again, I assume there was a PEP to have them included for
2.4? Can you point me to that PEP so I can evaluate writing a new PEP
to reverse it?
Thanks!
Dec 14 '05 #3
Bugs wrote:
Thanks Martin! As the python24.dll now contains modules and codecs that
weren't linked into the DLL before 2.4 and as we now need a PEP to have
them split out again, I assume there was a PEP to have them included for
2.4? Can you point me to that PEP so I can evaluate writing a new PEP
to reverse it?


There was no PEP. The current policy is "the maintainer of the Windows
port does whatever he considers the best thing". The previous maintainer
(Tim Peters) said this about the state of affairs in 2003:

http://mail.python.org/pipermail/pyt...er/038639.html

I offered a policy in:

http://mail.python.org/pipermail/pyt...er/038636.html

Thomas Heller proposed an explicit list in

http://mail.python.org/pipermail/pyt...er/038869.html

When I became maintainer of the Windows port, I made this policy:
everything should be included in pythonxy.dll, unless it requires
a library not included with the Python distribution.

I can't find a message where I communicated this policy at that time,
but I commented on the rationale several times since, e.g. in

http://groups.google.com/group/comp....5c8f597a86e743

Regards,
Martin
Dec 14 '05 #4
"Martin v. Löwis" <ma****@v.loewi s.de> writes:
Bugs wrote:
Thanks Martin! As the python24.dll now contains modules and codecs that
weren't linked into the DLL before 2.4 and as we now need a PEP to have
them split out again, I assume there was a PEP to have them included for
2.4? Can you point me to that PEP so I can evaluate writing a new PEP
to reverse it?


There was no PEP. The current policy is "the maintainer of the Windows
port does whatever he considers the best thing". The previous maintainer
(Tim Peters) said this about the state of affairs in 2003:

http://mail.python.org/pipermail/pyt...er/038639.html

I offered a policy in:

http://mail.python.org/pipermail/pyt...er/038636.html

Thomas Heller proposed an explicit list in

http://mail.python.org/pipermail/pyt...er/038869.html

When I became maintainer of the Windows port, I made this policy:
everything should be included in pythonxy.dll, unless it requires
a library not included with the Python distribution.

I can't find a message where I communicated this policy at that time,
but I commented on the rationale several times since, e.g. in

http://groups.google.com/group/comp....5c8f597a86e743


A PEP discussing the rationales would *really* be great.

Thomas
Dec 14 '05 #5
Thomas Heller wrote:
[snip]

A PEP discussing the rationales would *really* be great.


My whole impetus for this thread was to minimize the size of Python
executables created with py2exe. Right now they tend to be rather
large, even for very small applications, as they include a bunch of
unutilized Python functionality and/or encodings.

It would be nice to see a Python environment structure that is more
desktop-application-friendly for applications that distribute the Python
environment WITH the application (i.e. using py2exe). Ideally, it would
be nice to be able to distribute as minimal amount of the Python runtime
environment as possible.

New PEP: "Small is beautiful!" ;-)
Dec 15 '05 #6
Bugs wrote:
New PEP: "Small is beautiful!" ;-)


A PEP would have to be more elaborate than that;
it best be accompanied with an implementation as well.
Somebody has to do the work.

Regards,
Martin

Dec 16 '05 #7
Martin v. Löwis wrote:
Bugs wrote:
New PEP: "Small is beautiful!" ;-)

A PEP would have to be more elaborate than that;
it best be accompanied with an implementation as well.
Somebody has to do the work.

Regards,
Martin


That was my obviously ineffective attempt at humor, hence the ;-)
Dec 16 '05 #8
Bugs <do**@spam.me > writes:
Thomas Heller wrote:
[snip]
A PEP discussing the rationales would *really* be great.
My whole impetus for this thread was to minimize the size of Python
executables created with py2exe. Right now they tend to be rather
large, even for very small applications, as they include a bunch of
unutilized Python functionality and/or encodings.


That was what I guessed.
It would be nice to see a Python environment structure that is more
desktop-application-friendly for applications that distribute the
Python environment WITH the application (i.e. using py2exe). Ideally,
it would be nice to be able to distribute as minimal amount of the
Python runtime environment as possible.


Before py2exe had the single-file option, the most common 'complaint'
was the large number of files it generated. Now, the 'complaint' is
about the size of the executable. (Historically, the change in
Python2.4 was done by Martin on my request, that was before the
single-file option in py2exe. Plus, Python2.4 contains much more
encodings than 2.3 had.)

The PEP would probably have to find a balance between the number of
files and the size of a 'typical' py2exe built application. Personally,
I don't care too much on either the file number and the files sizes
since I use inno setup for distributing the applications.

Technically, as far as py2exe is concerned, it would be nice if the zlib
module was a builtin module because it would be easier to bootstrap the
executable - for obvious reasons the zlib module cannot be loaded from a
(compressed) zipfile. Unfortunately, this collides with Martin's
current policy to exclude extensions that need third party source code
from the python dll.

To summarize: Before someone requests a change to the builtin modules
list, a PEP would be needed to find the right balance.

Thomas
Dec 16 '05 #9
Thomas Heller wrote:
Technically, as far as py2exe is concerned, it would be nice if the zlib
module was a builtin module because it would be easier to bootstrap the
executable - for obvious reasons the zlib module cannot be loaded from a
(compressed) zipfile. Unfortunately, this collides with Martin's
current policy to exclude extensions that need third party source code
from the python dll.


That could change, of course. I personally would have no problems
requiring that zlib is available on the build machine - I always
have it available.

I would expect that others using the subversion trunk on Windows
would object, though. Perhaps it might be possible to create
some sort of compile time condition, ideally automatically
detected.

In any case, a PEP would have to answer these issues.

Regards,
Martin
Dec 16 '05 #10

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

Similar topics

9
1672
by: P | last post by:
Hi, How would one get a list of encodings that can be passed to "".encode() I know base64,utf8,latin,ascii work and these are listed in the encodings and codecs modules, but where can one get a definitive list?
27
2575
by: John Roth | last post by:
PEP 263 is marked finished in the PEP index, however I haven't seen the specified Phase 2 in the list of changes for 2.4 which is when I expected it. Did phase 2 get cancelled, or is it just not in the changes document? John Roth
24
3712
by: Robin Becker | last post by:
Investigating a query about the python path I see that my win32 installation has c:/windows/system32/python24.zip (which is non existent) second on sys.path before the actual python24/lib etc etc. Firstly should python start up with non-existent entries on the path? Secondly is this entry be the default for some other kind of python...
9
8139
by: Safalra | last post by:
The idea here is relatively simple: a java program (I'm using JDK1.4 if that makes a difference) that loads an HTML file, removes invalid characters (or replaces them in the case of common ones like Microsoft's 'smartquotes'), and outputs the file. The problem is these files will be on disk, so the program won't have the character encoding...
2
2256
by: Stormbringer | last post by:
Hello, I am trying to make an executable for one of my applications with cx freeze. All works ok although I must include python24.dll with it if I want to redistribute it. The big problem is python24.dll size, it's 1.8 MB and I am sure I don't need much of what's in there. I downloaded python source code and built the dll using the VC 7.1...
1
1472
by: Robert | last post by:
Martin v. Löwis schrieb: > Robert wrote: > > Wouldn't it be an issue to think about if future win-python distributions > > should keep on including the asian codecs in the main-dll? > > Indeed, it would. As I said before: if somebody defines a clear, fair > policy which finds agreement in the community, I'm willing to change the > current...
7
1854
by: Jonathan Fine | last post by:
Hello My problem is that I want a Python 2.4 module on a server that is running Python 2.3. I definitely want to use the 2.4 module, and I don't want to require the server to move to Python 2.4. More exactly, I am using subprocess, which is new in Python 2.4. What I am writing is something like
13
3666
by: mario | last post by:
Hello! i stumbled on this situation, that is if I decode some string, below just the empty string, using the mcbs encoding, it succeeds, but if I try to encode it back with the same encoding it surprisingly fails with a LookupError. This seems like something to be corrected? $ python Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04) on...
3
2648
by: Philip Semanchuk | last post by:
On Nov 9, 2008, at 7:00 PM, News123 wrote: Look under the heading "Standard Encodings": http://docs.python.org/library/codecs.html Note that both the page you found (which appears to be a copy of the Python documentation) and the reference I provide say, "Neither the list of aliases nor the list of languages is meant to be exhaustive".
0
7697
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8120
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7968
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.