473,397 Members | 1,960 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,397 software developers and data experts.

Some Results from Trying to Cheat py2exe

Hi,
I tried to reduce the size of some binary distribution in removing the
things I could expect on the presumed targets - generally a minimal
installation including Tcl/Tk.

The results are as follows:

(1) It does not seem possible to remove any *.pyd files: py2exe or whoever
wants them in the local directory. sys.path seems not to be used. Even
deleting it altogether has no impact at all.

(2) sys.path, sys.exec_prefix and sys.prefix are set to the local
directory, changes to them also have no visible effect.

(3) Removing DLLs has been more successful. However it is a matter of PATH
setting on the target, where they are found. This seems to be irrelevant for
the interpreter, alas not for tcl and tk.

(4) It seems that Tcl and Tk expect some support data in folders tcl8.3 and
tk8.3 which are expected at ../lib (i.e. one back and in a folder called
lib). This is generally NOT the situation in a standard Python installation
(where they are in ..\tcl) nor is it the case in the local directory of
py2exe (where they are in ./tcl). This is something I do not understand!

(5) Thus if the DLLs are found in a standard Python installation, it will
fail. It is generally not possible to make a safe setup because of
uncontrollable PATH settings.....

(6) Those Tcl/Tk folders are quite large, mostly because of some asiatic
unicode files. Those can safely be deleted I think.

Conclusion: For distributions to customers without Python and unwilling to
do any system changes it would be safest to fill some PYAPP folder with
tcl/tk, the tcl folder and interpreter and maybe wxms24h DLLs. Than just
drop your installations into that folder. This can safely be done when
un-zipping them. The drawback is that there is no strcture at all inside
that folder.

The second best solution would be to put that PYAPP folder anywhere (however
the structure must be changed, because of (4): PYAPP has to contain a DLL
directory and the LIB directory for the tcl/tk folders. the PATH setting
must be done to PYAPP/LIB. Now a reduced distribution can be put anywhere.
This has some advantages from the point of configuration control, however is
bound to break if the user decides to install a full Python.

The situation is a mess and it took me some time to sort out all the
problems (help came from Thomas Heller). So may be it will help someone -
and be it to keep hands off ;-)
Kindly
Michael P
Jul 18 '05 #1
0 1255

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

Similar topics

0
by: RJS | last post by:
Hi all, I can't get a py2exe compiled app to run with numarray (numarray-0.5.win32- py2.2). Also wxPythonWIN32-2.3.3.1-Py22 and ActivePython-2.2.1-222. In the sample below, commenting out...
1
by: | last post by:
I want a binnary file to my aplicattion, but py2exe don't match the xmll.sax module. the py2exe shows this errors: warning: py2exe:...
2
by: x-herbert | last post by:
Hi, I have a small test to "compile" al litle script as a WMI-Tester. The script include a wmi-wrapper and "insert" the Win32-modeles. here the code: my "WMI-Tester.py" ----- import wmi
2
by: Stefan Behrens | last post by:
Hi, does anybody know how I can get py2exe to work with wxPython's wxCalendarCtrl? Currently, I have just a "standard" setup.py, and py2exe gives me a syntax error. Do I need to include any...
0
by: Kathleen Kudzma | last post by:
I'm having a problem with py2exe for Python 2.3. I got fixed the Lookuperror no codec search functions registered: can't find encoding by following the instructions on the py2exe page (added...
8
by: Kathleen Kudzma | last post by:
Does anyone know how to resolve the following problem that I'm getting in Python 2.2 and 2.3? PROBLEM: When I try to create a classReader object I get an exception: "SAXReaderNotAvailable: No...
0
by: Steven Bell | last post by:
I am trying to build an executable from a python script. Using python 2.3, SOAPpy 0.10.3, Py2exe 0.4.2. Build command: python setup.py py2exe -w --includes xml.sax.drivers2.drv_py I get the...
6
by: Luc Saffre | last post by:
Hello, I had a strange problem when freezing (using either py2exe or McMillan installer) a script that imports reportlab (which imports PIL (which imports FixTk))). - Python 2.3.3c (also with...
5
by: Doug Morse | last post by:
Hi, I have an application that runs just fine using the standard Python distro interpreter (v2.5.1 on WinXP) but throws the following exception when run as an executable built with py2exe. My...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
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
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...
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.