[Tutor] GETTING AN _.EXE VERSION OF _.PY program to run on amachine that does not have Python installed on it.

Jacob S. keridee at jayco.net
Fri Sep 16 01:50:58 CEST 2005

Might I suggest that you use the built in min() and max() because they are probably faster.

  ----- Original Message ----- 
  From: JackA 
  To: tutor at python.org 
  Sent: Monday, September 12, 2005 11:50 PM
  Subject: [Tutor] GETTING AN _.EXE VERSION OF _.PY program to run on amachine that does not have Python installed on it.

  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


  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


  Tutor maillist  -  Tutor at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050915/9d578c7e/attachment.html

More information about the Tutor mailing list