[Tutor] GETTING AN _.EXE VERSION OF _.PY program to run on a machine that does not have Python installed on it.
JackA
jacka at mts.net
Tue Sep 13 06:50:52 CEST 2005
I am attaching a word document copy of this EMail which might be easier to read and follow if your EMail window rearanges things to much.
I would like thank Dax Reyes and John Fouhy for taking the trouble to respond to my attempt to create an _.EXE from a Python program.
The question now is; can the PY2EXE procedure make PROG.EXE ( Or a set of files. ) from PROG.PY that will allow PROG.EXE to run on a machine that does not have Python installed on it, and if so what has to be fixed and how?
I have created PROG.EXE from PROG.PY , but it appears NOT to be portable in that when I try to run PROG.EXE on my wife's machine which does not have Python installed on it I get a " See the logfile PROG.EXE log for details". The logfile has the following ;
Traceback (most recent call last):
File "PROG.PY", line 364, in ?
File "PROG.PY", line 320, in Main
EOFError: EOF when reading a line
Lines 320 and 364 are shown below. Line 364 is the last line of the program. No line reference on the EOFError was given.
filename=raw_input("Enter destination and filename as > C:\Name.STR <: ") # line 320 listed in traceback log.
Main() # line 360 listed in traceback log.
The 6 lines of PyToExe.PY used to make PROG.EXE , is shown below starting with ### in line #1.
### PyToExe.PY = file name. _.PY > _.EXE
from distutils.core import setup
import py2exe
setup(windows=['PROG.PY'])
The DOS com line command was : PYTHON PyToExe.PY PY2EXE .
The program, PROG.PY has no errors and runs fine under Python24, as does PROG.EXE on a Python equipped machine. Actually I can delete PROG.EXE and double click the PROG.PY icon in the Python24 folder and it runs fine.
I am running an XP machine with a 1.8 GHz CPU, 700 Meg of memory and 36 Gbyte of free space on disk.
I am attaching PROG.PY in case anyone has any questions on it.
At some point over the course of trying to run PROG.EXE it was indicated that Python24.dll was missing so it has been copied into the DIST folder where
PROG.EXE is located as well as WINDOWS\SYSTEM32\DRIVERS ,
WINDOWS and WINDOWS\SYSTEM .
Jack Anema
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050912/a495be0d/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AFTER EXE.doc
Type: application/msword
Size: 20992 bytes
Desc: not available
Url : http://mail.python.org/pipermail/tutor/attachments/20050912/a495be0d/AFTEREXE-0001.doc
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: PROG.PY
Url: http://mail.python.org/pipermail/tutor/attachments/20050912/a495be0d/PROG.pot
More information about the Tutor
mailing list