473,473 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

py2exe 0.5.0 (finally) released


**py2exe 0.5.0** (finally) released
===================================

py2exe is a Python distutils extension which converts python scripts
into executable windows programs, able to run without requiring a
python installation.

News

Python 2.3 is required, because the new zipimport feature is used.
The zipimport mechanism is able to handle the early imports of the
warnings and also the encodings module which is done by Python.

Creates a single directory, which must be deployed completely.

py2exe can create any number of console and gui executables in
this directory, plus optionally windows service exes, plus
optionally exe and dll com servers. The com servers can expose
one or more com object classes.

All pure Python files are contained in a single zip archive, which
is shared by all the executables. The zip archive may also be
used by programs embedding Python. Since extension modules cannot
be imported from zipfiles, simple pure Python loaders are included
in the zipfile which load the extensions from the file system
(without requiring that the directory is in sys.path).

It is now simple to build py2exe from the sources, provided you
have MSVC6 installed - there are no dependencies on win32all
sources.

The created executables are standard PE executable files now, no
longer is something appended to the exe portion.

Download from the usual location:

<http://starship.python.net/crew/theller/py2exe>

Many thanks to Mark Hammond who worked hard to improve the COM
support, and suggested and implemented a lot of the new features.

Enjoy,

Thomas
Jul 18 '05 #1
10 2233
Hi,

I just try this new release with the simple sample, it throw an
exception :

Traceback (most recent call last):
File "setup.py", line 34, in ?
console = ["hello.py"],
File "C:\PYTHON23\lib\distutils\core.py", line 149, in setup
dist.run_commands()
File "C:\PYTHON23\lib\distutils\dist.py", line 907, in run_commands
self.run_command(cmd)
File "C:\PYTHON23\lib\distutils\dist.py", line 927, in run_command
cmd_obj.run()
File "C:\PYTHON23\Lib\site-packages\py2exe\build_exe.py", line 197, in run
self.create_binaries(py_files, extensions, dlls)
File "C:\PYTHON23\Lib\site-packages\py2exe\build_exe.py", line 391, in create_
binaries
arcname, target.script)
File "C:\PYTHON23\Lib\site-packages\py2exe\build_exe.py", line 590, in build_e
xecutable
self.add_versioninfo(target, exe_path)
File "C:\PYTHON23\Lib\site-packages\py2exe\build_exe.py", line 609, in add_ver
sioninfo
from py2exe.resources.VersionInfo import Version, RT_VERSION
File "C:\PYTHON23\Lib\site-packages\py2exe\py2exe.py", line 3, in ?
raise RuntimeError, "something's wrong"
RuntimeError: something's wrong

hello.exe works indeed

I try it on win98 and winNT, with last python2.3.3

There is no unicode file do download for winNT ?

bye

--
Wilk - http://flibuste.net
Jul 18 '05 #2
| http://starship.python.net/crew/theller/py2exe

Thomas ....

This is my first attempt at running any version of py2exe ....

Using ....

Win98_SE
Python 2.3 Enthought Edition
py2exe 0.50

The samples hello.py and test_wx.py in the simple folder
function as expected when run as python scripts ....

setup.py goes through the motions and creates
the build and dist directories and the following
files are produced in .... /simple/dist ....

hello.exe
library.zip
python23.dll
w9xpopen.exe
wxc.pyd
wxmsw24.dll
_sre.pyd

hello.exe will not run ....

Could not locate script resource:

The following Traceback from setup.py indicates
that unicows.dll seems to be missing ....

python setup.py py2exe > py2exe_simple.txt
Traceback (most recent call last):
File "setup.py", line 34, in ?
console = ["hello.py"],
File ".\distutils\core.py", line 149, in setup
File ".\distutils\dist.py", line 907, in run_commands
File ".\distutils\dist.py", line 927, in run_command
File "K:\PYTHON23\Lib\site-packages\py2exe\build_exe.py", line 197, in run
self.create_binaries(py_files, extensions, dlls)
File "K:\PYTHON23\Lib\site-packages\py2exe\build_exe.py", line 391, in create_
binaries
arcname, target.script)
File "K:\PYTHON23\Lib\site-packages\py2exe\build_exe.py", line 566, in build_e
xecutable
add_resource(unicode(exe_path), script_bytes, u"PYTHONSCRIPT", 1, True)
RuntimeError: this function requires unicows.dll in the Python directory on Win
95/98/Me

I found one version of unicows.dll that was previously installed
with another program, OE-Quote-fix, and stuck it in the Python folder,
but then Python page faulted from setup.py ....

Will a different/current version of unicows.dll
in the Python folder alieviate this problem ????
--
Cousin Stanley
Human Being
Phoenix, Arizona

Jul 18 '05 #3

I answer to myself, the problem was because i didn't remove an old
py2exe version in site-packages.

Bye

Wilk <wi******@OUTflibuste.net> writes:
Hi,

I just try this new release with the simple sample, it throw an
exception :

Traceback (most recent call last):
File "setup.py", line 34, in ?
console = ["hello.py"],
File "C:\PYTHON23\lib\distutils\core.py", line 149, in setup
dist.run_commands()
File "C:\PYTHON23\lib\distutils\dist.py", line 907, in run_commands
self.run_command(cmd)
File "C:\PYTHON23\lib\distutils\dist.py", line 927, in run_command
cmd_obj.run()
File "C:\PYTHON23\Lib\site-packages\py2exe\build_exe.py", line 197, in run
self.create_binaries(py_files, extensions, dlls)
File "C:\PYTHON23\Lib\site-packages\py2exe\build_exe.py", line 391, in create_
binaries
arcname, target.script)
File "C:\PYTHON23\Lib\site-packages\py2exe\build_exe.py", line 590, in build_e
xecutable
self.add_versioninfo(target, exe_path)
File "C:\PYTHON23\Lib\site-packages\py2exe\build_exe.py", line 609, in add_ver
sioninfo
from py2exe.resources.VersionInfo import Version, RT_VERSION
File "C:\PYTHON23\Lib\site-packages\py2exe\py2exe.py", line 3, in ?
raise RuntimeError, "something's wrong"
RuntimeError: something's wrong

hello.exe works indeed

I try it on win98 and winNT, with last python2.3.3

There is no unicode file do download for winNT ?

bye

--
Wilk - http://flibuste.net


--
Wilk - http://flibuste.net
Jul 18 '05 #4
| ....
| python setup.py py2exe
| ....
| RuntimeError: this function requires unicows.dll in the Python directory
| on Win95/98/Me
| ....

Thomas ....

Google search found a MicroSoft download
for unicows.dll ....

http://www.microsoft.com/downloads/d...displaylang=en

A copy of this dll in the Python23 folder
has eliminated the problem and Windows executables
generated for .... /py2exe/samples/simple work as expected ....

Thanks for making py2exe available ....

Now I'm looking forward to learning how to use it ....

--
Cousin Stanley
Human Being
Phoenix, Arizona

Jul 18 '05 #5
OPQ
Thomas Heller <th*****@python.net> wrote in message news:<y8**********@python.net>...
**py2exe 0.5.0** (finally) released py2exe is a Python distutils extension which converts python scripts
into executable windows programs, able to run without requiring a
python installation.
Enjoy,

Thomas


Great !
Works flawlessly for me.
The ptyhoncom support is much better for me.
Sometimes, in the past, py2exe would forget to include (because of me)
some pythoncom.dll.
Not anymore.
But anyway, there is a little annoying point: in the past (0.4.x),
while compiling, py2exe would turn all necessary files to pyc or pyo
in-place
And then, after 1 compilation step, it wouldn't do it anymore, but
just for the file which have changed.

Now, since it put all the file in the zip archive, It won't generate
..pyo files in-place, but only in the archive.
And thus, each time I compile py application, I see that py2exe
bye-compile stuff that didn't change, but do not exists in .pyo.

I may be wrong in my analyse, but that's how I see it.

Other stuff: for the same EXE, I have (totally arbitrary number)
8.6 Mb of data with py2exe 0.4
11.7 M with 0.5 (zipfile activated)

Try to explain that !
Anyway, great stuff, great samples to
---OPQ
Jul 18 '05 #6
Maybe I'm missing it, but I don't see how to specify an icon to use
for the exe. Is that funtionality no longer available?

-Ruben
Jul 18 '05 #7
> Maybe I'm missing it, but I don't see how to specify an icon to use
for the exe. Is that funtionality no longer available?

-Ruben


Perhaps I'm not using the latest version, but --icon <icon file> seems
to work for me.

- Josiah
Jul 18 '05 #8
ny**********@yahoo.com (R.Marquez):
Maybe I'm missing it, but I don't see how to specify an icon to use
for the exe. Is that funtionality no longer available?


icon_resources works for me, like so:

setup( windows = ["wxKnife.py",
{"script":"wxKnife.py","icon_resources":[(1,"images/app2.ico")]}],
console=["installed_updates.py","installed_sw.py"],
data_files=[("images",["images/app2.ico",]),]
)

--
Wir danken für die Beachtung aller Sicherheitsbestimmungen
Jul 18 '05 #9
Wolfgang Strobl <ne***@mystrobl.de> wrote
icon_resources works for me, like so:

setup( windows = ["wxKnife.py",
{"script":"wxKnife.py","icon_resources":[(1,"images/app2.ico")]}],
console=["installed_updates.py","installed_sw.py"],
data_files=[("images",["images/app2.ico",]),]
)


That worked. I see that I need to visit the wiki page now. Thank you.

-Ruben
Jul 18 '05 #10
ny**********@yahoo.com (R.Marquez) writes:
Wolfgang Strobl <ne***@mystrobl.de> wrote
icon_resources works for me, like so:

setup( windows = ["wxKnife.py",
{"script":"wxKnife.py","icon_resources":[(1,"images/app2.ico")]}],
console=["installed_updates.py","installed_sw.py"],
data_files=[("images",["images/app2.ico",]),]
)


That worked. I see that I need to visit the wiki page now. Thank you.

-Ruben


It is also in the samples\advanced, although commented out.

Thomas
Jul 18 '05 #11

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

Similar topics

17
by: Thomas Heller | last post by:
py2exe 0.6.1 released ===================== py2exe is a Python distutils extension which converts python scripts into executable windows programs, able to run without requiring a python...
1
by: Thomas Heller | last post by:
This is a bugfix release for py2exe 0.6.1. py2exe 0.6.2 released ===================== py2exe is a Python distutils extension which converts python scripts into executable windows programs,...
0
by: Jimmy Retzlaff | last post by:
py2exe 0.6.3 released ===================== py2exe is a Python distutils extension which converts Python scripts into executable Windows programs, able to run without requiring a Python...
0
by: Jimmy Retzlaff | last post by:
py2exe 0.6.4 released ===================== py2exe is a Python distutils extension which converts Python scripts into executable Windows programs, able to run without requiring a Python...
0
by: Jimmy Retzlaff | last post by:
py2exe 0.6.5 released ===================== py2exe is a Python distutils extension which converts Python scripts into executable Windows programs, able to run without requiring a Python...
0
by: Jimmy Retzlaff | last post by:
py2exe 0.6.6 released ===================== py2exe is a Python distutils extension which converts Python scripts into executable Windows programs, able to run without requiring a Python...
1
by: Jimmy Retzlaff | last post by:
py2exe 0.6.8 released ===================== py2exe is a Python distutils extension which converts Python scripts into executable Windows programs, able to run without requiring a Python...
0
by: Larry Bates | last post by:
Jimmy Retzlaff wrote: Everyone, Thanks for all your hard work on py2exe, it is greatly appreciated. -Larry Bates
0
by: Jimmy Retzlaff | last post by:
py2exe 0.6.9 released ===================== py2exe is a Python distutils extension which converts Python scripts into executable Windows programs, able to run without requiring a Python...
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
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
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.