[Tutor] Making my program an executable/distributable
Danny Yoo
dyoo@hkn.eecs.berkeley.edu
Mon, 27 Aug 2001 00:56:59 -0700 (PDT)
On Sat, 25 Aug 2001, paul wrote:
> > > i have asked this question before, about a week or so ago, but i just
> > > want to re-ask it in case anyone missed it. i have written a python
> > > program including Tkinter, and when i used py2exe to convert it to an
> > > executable, it called for the riscosenviron, riscos, riscospath, and
> > > ce modules. is this because of my using Tkinter in my script? does
> > > py2exe not support Tkinter? i'm just curious. i finally finished my
> > > program, and i just want to be able to distribute it. please help?!?!
Ok, I finally got off my lazy butt and rebooted. *grin* I believe you can
ignore the warnings. You'll still see an executable get created, so I
wouldn't worry about it too much. Take a look:
###
E:\tmp4>python setup.py py2exe
[lots of output flies by the screen]
warning: py2exe: * The following modules were not found:
warning: py2exe: * win32api
warning: py2exe: * riscosenviron
warning: py2exe: * ce
warning: py2exe: * riscos
warning: py2exe: * riscospath
warning: py2exe: ***************************************************************
**********
removing 'build\bdist.win32\winexe\collect\guifun' (and everything under
it)
removing 'build\bdist.win32\winexe' (and everything under it)
E:\tmp4>dir
Volume in drive E is DISK 2
Volume Serial Number is 2854-B3CA
Directory of E:\tmp4
08/26/2001 11:17p <DIR> .
08/26/2001 11:17p <DIR> ..
08/26/2001 11:17p 8,850 guifun.py
08/26/2001 11:17p 96 setup.py
08/26/2001 11:17p 99 #setup.py#
08/27/2001 12:25a <DIR> build
08/27/2001 12:25a <DIR> dist
08/27/2001 12:28a 18,876 results.log
4 File(s) 27,921 bytes
4 Dir(s) 209,354,752 bytes free
E:\tmp4>cd dist\guifun
E:\tmp4\dist\guifun>dir
Volume in drive E is DISK 2
Volume Serial Number is 2854-B3CA
Directory of E:\tmp4\dist\guifun
08/27/2001 12:25a <DIR> .
08/27/2001 12:25a <DIR> ..
08/27/2001 12:25a <DIR> tcl
08/27/2001 12:44a 191,941 guifun.exe
07/20/2001 01:19a 708,668 python21.dll
07/20/2001 01:20a 49,208 _sre.pyd
07/20/2001 01:20a 28,732 _tkinter.pyd
08/08/2000 01:54p 928,768 tk83.dll
08/08/2000 01:48p 619,520 tcl83.dll
6 File(s) 2,526,837 bytes
3 Dir(s) 209,354,752 bytes free
###
Can you check to see if the guifun.exe file is there for you too? If
you're going to send this to your friends, make sure to send the whole
guifun directory over.
However, when I run your program, nothing appears on my screen. Don't
forget to do a 'mainloop()' at the very end of your program: otherwise,
the program will exit even before it waits for your user to use your GUI.
Also, since your program appears to depends on "C:/python20/forlist.py",
you might want to include that file along with your program somehow.
Good luck!