Re: Py2exe



D wrote:
Jay - what I'm not sure of is the syntax to use. I have downloaded and
installed py2exe.


First a question:

Have you written the server program as a windows service? You can't
just run something as a service, it has to be written to be a service.

Your setup files will look something like the ones below.

Client:

from distutils.core import setup
import py2exe
setup(name="client", zipfile=None,
windows=[{"script":"client.py",
"icon_resources":[(1,"client.ico")]}],
options={"py2exe": {"compressed": 1,
"optimize": 2,
"bundle_files":1}}
)

Obviously the program here was called client.py. You will
need an icon to supply to icon_resources. This creates a
single .EXE file from as much as py2exe can possible put
into it.

Server:

from distutils.core import setup
import py2exe
setup(service=[script:"server.py"], zipfile=None,
options={"py2exe":{"compressed": 1,
"optimize": 2,
"bundle_files":1}}
)


Of course replace 'server' with the name of your program.

These are merely EXAMPLES. Your specific needs might be
different depending on specifics of your program.

Hope it helps.

Larry Bates
.



Relevant Pages

  • Re: building exe from script
    ... from distutils.core import setup ... REM make sure that python is in your system path ... python setup.py py2exe ... Is there any solution for building exe file from python script ...
    (comp.lang.python)
  • Re: Little tool - but very big size... :-(
    ... # The lib directory contains everything except the executables and the python dll. ... Sorry, I have not used py2exe for some time, you would be better to ask this question on the py2exe list: ... Otherwise something like Inno Setup ...
    (comp.lang.python)
  • RE: py2exe error
    ... Change the setup script to: ... This will force py2exe to include the encodings package which should solve ... I've written a script that uses pickle to store data to a file. ...
    (comp.lang.python)
  • RE: Py2exe and WMI module
    ... >Python program using Tim Goldens WMI-module. ... The py2exe produce the ... You then need a setup script such as this one: ... snipped from Python proxy module ...> ...
    (comp.lang.python)
  • RE: py2exe error
    ... Pieter Claerhout wrote: ... > from distutils.core import setup ... > This will force py2exe to include the encodings package which should solve ... > when running from regular python interperter, ...
    (comp.lang.python)