[Tutor] CREATING A PR.EXE FROM A PR.PY
raikage at gmail.com
Wed Sep 7 04:20:26 CEST 2005
Do you still need help regarding exe creation?
In case you do. Here are some notes I took way back in 2003.
you must create a setup.py
put something like
from distutils.core import setup
sbiGui = ['samplemodule', 'samplemodule.checkstatus','samplemodule.client']
sbiModules = ['anothermodule']
author="Dakila Reyes II",
author_email="dareyes at up.edu.ph",
packages= sbiGui + sbiModules,
create a setup.cfg also
version-companyname=Dax Reyes Solutions
version-filedescription = TestApp Modules
version-fileversion = 18.104.22.168
version-legaltrademarks = Blah blah blah.
version-productname = TestApp
version-productversion = 22.214.171.124
Then after that
go to the current directory where TestAppMain.py and setup.py reside.
c:\your_python_install_dir\python setup.py py2exe -w -O2
This will create a subdirectory dist\TestApp that contains the exe.
*Note Check the -O2 flag, not sure what will be the side effects to your app.
Hope this helps.
If you need to also package it into a nice simple installer. I might
be able to help.
On 9/5/05, Jack Anema <JAnema2 at mts.net> wrote:
> Can you or someone give me very specific instructions as to how to create an
> _.EXE file from a _.PY file.
> I have spent a lot of time looking through all 7 sections of FAQ's at
> http://www.python.org/doc/faq/ and many other sights.
> I have also gone to
> http://starship.python.net/crew/theller/py2exe/ and
> tried to use the general comments there.
> I did download and install *win-py2.4.exe . This installed
> successfully as far as I can see. There were no error messages and
> REMOVEPY2EXE.EXE was created in my PYTHON24 folder.
> The machine I am running, is running XP professional, 2002. It has a
> Pentiuum(R) 4, 1.8 Ghz CPU. The drive has 37 GB free.
> I am by no means a computer expert but I am not illiterate either. I have
> used MS Quick Basic for many years. In the past I have also used APL and
> Fortran on various machines over the years. I just am not familiar enough
> with Python and have not been able to find the detailed data I need to do
> what I want. Up to a month ago I had never heard of Python and I badly need
> the ability to make *.PY programs files run as *.EXE
> Can you or someone supply the very specific instructions to do this? I
> would also be perfectly willing to arrange with someone to call them at
> their convenience and do it over the phone and compensate the person for
> their effort and time.
> I sincerely and very much appreciate anyone's response and help! Thank you!
> Jack Anema.
> Tutor maillist - Tutor at python.org
More information about the Tutor