[Tutor] a question about making standalone .exes from python

Noah Luken nluken@earthlink.net
Mon, 18 Jun 2001 14:45:52 -0400


This is a multi-part message in MIME format.

------=_NextPart_000_05AA_01C0F805.5F20E490
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi everyone,=20

(Let me preface this question -- I am a student of architecture =
interested in using python for basic graphic design, algorithms, etc.   =
I have, in the process, been forced to learn some Tkinter, some (quite a =
bit) of OpenGL, as well as the usual complement of useful python =
modules. (PIL, Numeric, pyglut, etc.).  I'm a newbie at ALL of them =
(sigh).)

I'm trying to make a standalone .exe of a python script which invokes =
and draws in an openGL window.  The imports are thus:

from OpenGL.GL import *
from OpenGL.GLUT import *
from OpenGL.GLU import *
import whrandom
import time

I poked around on the internet and tried Installer by Gordon MacMillan, =
since it seemed most up to date.  After installing and running =
SetupTk.py once, I tried his standalone.py on my script =
(interaction02.py) and got this result:


> c:\python21\python.exe c:\python21\installer\Builder.py  interaction
W: exec statment detected at line 281 of imputil
W: No module named dos
W: No module named mac
W: No module named nt.stat
W: No module named os2
W: No module named posix
W: Cannot determine your Windows or System directories
W: Please add them to your PATH if .dlls are not found
W: exec statment detected at line 65 of os
W: exec statment detected at line 138 of os
W: eval hack detected at line 405 of os
W: No module named ce
W: No module named strop.lowercase
W: No module named strop.maketrans
W: No module named strop.uppercase
W: No module named strop.whitespace
W: No module named win32api
W: No module named pwd
W: No module named riscos
W: No module named riscosenviron
W: No module named riscospath
W: No module named MACFS
W: No module named macfs
W: No module named errno.EINVAL
W: eval hack detected at line 634 of pickle
W: __import__ hack detected at line 786 of pickle
W: No module named OpenGL.dynload._opengl
W: No module named OpenGL.dynload._opengl_num
W: No module named OpenGL.dynload.openglutil
W: No module named OpenGL.dynload.openglutil_num
W: No module named OpenGL.dynload.wgl
W: No module named OpenGL.GL.CarefulFunction
W: No module named OpenGL.GL.Error
W: No module named OpenGL.dynload._glu
W: No module named OpenGL.dynload._glu_num
W: No module named OpenGL.dynload._glut

Needless to say, this program didn't work on a machine with opengl card, =
drivers, etc. (problem with .dynload modules)  I'm curious if there's a =
way to get standalone .exe programs to work with python, and I'm also =
wondering if I shouldn't just bite the bullet and program this in C or =
C++ (which would involve learning one of the bad old languages I thought =
I could avoid).  Is there a way to go from python to c to an .exe?  Is =
python the right language for this or am I barking up the wrong tree =
here?

thanks in advance for any help you can offer.

-noah luken
nluken@mit.edu=20

=20



------=_NextPart_000_05AA_01C0F805.5F20E490
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3315.2870" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi everyone, </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>(Let me preface this question -- I am a =
student of=20
architecture interested in using python for basic graphic design, =
algorithms,=20
etc.&nbsp;&nbsp; I have, in the process, been forced to learn&nbsp;some =
Tkinter,=20
some&nbsp;(quite a bit) of OpenGL, as well as the usual complement of =
useful=20
python modules. (PIL, Numeric, pyglut, etc.).&nbsp; I'm a newbie at ALL =
of them=20
(sigh).)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I'm trying to make a standalone .exe of =
a=20
python&nbsp;script which&nbsp;invokes and draws&nbsp;in an=20
openGL&nbsp;window.&nbsp; The imports are thus:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>from OpenGL.GL import *<BR>from =
OpenGL.GLUT import=20
*<BR>from OpenGL.GLU import *<BR>import whrandom<BR>import =
time</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I poked around on the internet and =
tried Installer=20
by Gordon MacMillan, since it seemed most up to date.&nbsp; After =
installing and=20
running SetupTk.py once, I tried his standalone.py on my script=20
(interaction02.py) and got this result:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&gt; c:\python21\python.exe=20
c:\python21\installer\Builder.py&nbsp; interaction<BR>W: exec statment =
detected=20
at line 281 of imputil<BR>W: No module named dos<BR>W: No module named =
mac<BR>W:=20
No module named nt.stat<BR>W: No module named os2<BR>W: No module named=20
posix<BR>W: Cannot determine your Windows or System directories<BR>W: =
Please add=20
them to your PATH if .dlls are not found<BR>W: exec statment detected at =
line 65=20
of os<BR>W: exec statment detected at line 138 of os<BR>W: eval hack =
detected at=20
line 405 of os<BR>W: No module named ce<BR>W: No module named=20
strop.lowercase<BR>W: No module named strop.maketrans<BR>W: No module =
named=20
strop.uppercase<BR>W: No module named strop.whitespace<BR>W: No module =
named=20
win32api<BR>W: No module named pwd<BR>W: No module named riscos<BR>W: No =
module=20
named riscosenviron<BR>W: No module named riscospath<BR>W: No module =
named=20
MACFS<BR>W: No module named macfs<BR>W: No module named =
errno.EINVAL<BR>W: eval=20
hack detected at line 634 of pickle<BR>W: __import__ hack detected at =
line 786=20
of pickle<BR>W: No module named OpenGL.dynload._opengl<BR>W: No module =
named=20
OpenGL.dynload._opengl_num<BR>W: No module named =
OpenGL.dynload.openglutil<BR>W:=20
No module named OpenGL.dynload.openglutil_num<BR>W: No module named=20
OpenGL.dynload.wgl<BR>W: No module named OpenGL.GL.CarefulFunction<BR>W: =
No=20
module named OpenGL.GL.Error<BR>W: No module named =
OpenGL.dynload._glu<BR>W: No=20
module named OpenGL.dynload._glu_num<BR>W: No module named=20
OpenGL.dynload._glut<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Needless to say, this program didn't =
work on a=20
machine with opengl card, drivers, etc. (problem with .dynload modules)  =
I'm=20
curious if there's a way to get&nbsp;standalone&nbsp;.exe programs to =
work with=20
python, and I'm also wondering if I shouldn't just bite the bullet and =
program=20
this in C or C++ (which would involve learning one of the bad old =
languages I=20
thought I could avoid).&nbsp;&nbsp;Is&nbsp;there a way to go from python =
to=20
c&nbsp;to an .exe?&nbsp; Is python the right language for this or am I =
barking=20
up the wrong tree here?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>thanks in advance for any help you can=20
offer.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>-noah luken</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><A =
href=3D"mailto:nluken@mit.edu">nluken@mit.edu</A>=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;</DIV></FONT></BODY></HTML>

------=_NextPart_000_05AA_01C0F805.5F20E490--