If it hasn't already been done, a good addition to the wiki would be
an example of how to convert a demo app from the
wxDemos into a stand alone program.
If it has already been added, would someone send me the link?
If it hasn't already been done, a good addition to the wiki would be
an example of how to convert a demo app from the
wxDemos into a stand alone program.
If it has already been added, would someone send me the link?
As an afterthought, I send you also one of my setup.py files as an example (if you do not understand the notes in Italian, you can ignore them, they are not so important):
#!/usr/bin/env python
“”"
Agenda.setup
File di caricamento di Agenda.py
“”"
from distutils.core import setup
import py2exe
path = ‘E:\Python25\Lib\site-packages\rb\bitmaps\’
bitmap_resources = [‘Exit.xpm’, ‘FillGrid.xpm’, ‘Flush.xpm’,
‘First.xpm’, ‘Last.xpm’,
‘panflute.xpm’, ‘New.xpm’, ‘Modify.xpm’,
‘Break.xpm’,‘Cancel.xpm’, ‘Save.xpm’,‘AZ.xpm’]
for j in range(len(bitmap_resources)):
bitmap_resources[j] = path + bitmap_resources[j]
setup(name=‘Agenda’,
version=‘1.1’,
description=‘Agenda - applicazione per la gestione degli impegni’,
author= ‘Raffaello Barella’,
author_email=‘errebi1941@gmail.com’,
packages= [‘E:\Python25\Lib\site-packages\rb’],
data_files=[(‘bitmaps’, bitmap_resources),
(‘’, [‘Agenda.ico’])],
windows = [
{
“script”: “Agenda.py”,
“icon_resources”: [(2,‘Agenda.ico’)]
}
]
)
Bye
2008/3/27, Raffaello Barella barbarossa.platz@gmail.com:
Try with py2exe, that you’ll find at www.py2exe.org/ , and with pyinstaller, at http://pyinstaller.python-hosting.com/.
In any case the result is a file named setup.py that, started from the command line, will transform your .py into an .exe file.
A very useful addition either to py2exe or pyinstaller is the following file, named Make_exe.bat, to be put into the same directory:
rem *** Make_exe.bat***
rem *** Used to create a Python exe
rem ***** get rid of all the old files in the build folder
rd /S /Q build
rem ***** create the exe
E:\Python25\python setup.py py2exerem **** pause so we can see the exit codes
pause “done…hit a key to exit”rem **** cancel the build directory
rd /S /Q buildMake_exe.bat has saved me a lot of work, because it allows to repeat the action of converting all the revisions of your .py with a simple click. I am only sorry that I have forgotten where I got it from, and so cannot thank the author.
2008/3/27, Tony Cappellini cappy2112@gmail.com:
If it hasn’t already been done, a good addition to the wiki would be
an example of how to convert a demo app from the
wxDemos into a stand alone program.If it has already been added, would someone send me the link?
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org