Differences between revisions 8 and 11 (spanning 3 versions)
Revision 8 as of 2005-08-24 13:48:44
Size: 1882
Editor: 24
Comment:
Revision 11 as of 2014-08-04 08:31:01
Size: 458
Editor: 64
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== Running the setup script ==

''Editors note: this recipe has been posted by Mike C. Fletcher to comp.lang.python''

Open a command-prompt window. (You'll find the command-prompt's icon
in "Start|Programs" or "Start|Programs|Accessories", it may be called
"MSDOS Prompt".)

Switch to the directory where your setup.py file is
(use the shell's {{{cd}}} command to move between directories, you can use
the "dir" command to see what files are in the current directory to
confirm that the setup.py file is present),

{{{
P:\>cd OpenGLContext

P:\OpenGLContext>dir setup.py
 Volume in drive P is DATASTORE
 Volume Serial Number is 74A4-1C80

 Directory of P:\OpenGLContext

27/01/2004 06:01p 3,853 setup.py
               1 File(s) 3,853 bytes
               0 Dir(s) 11,575,771,136 bytes free
}}}

*then* run:

{{{
python setup.py py2exe --help
}}}

from that command prompt. You may need to specify the full path to
python if you haven't added your python installation directory to the
path, something like:

{{{
P:\OpenGLContext>c:\bin\lang\py23\python.exe setup.py py2exe
}}}
depending on where you installed python.

HTH, and good luck,
Mike


== Trick ==

Create a batch file that you can run from Windows Explorer. Here is a copy of my make_exe.bat file:

{{{
rem *** Used to create a Python exe

rem ***** get rid of all the old files
rd /S /Q build

rem ***** create the exe
c:\Python23\python setup.py py2exe

rem **** pause so we can see the exit codes
pause "done...hit a key to exit"
}}}

I keep a copy of this file in each folder where I have a Python app that I want to make into an exe. To create the exe, open up the folder in
Windows Explorer and double click on the "make_exe.bat" file. I find this to be much easier than working in the DOS command line environment.

  
I'm a 38 years old and working at the high school (Industrial and Labor Relations).<<BR>>
In my spare time I'm trying to learn Swedish. I have been there and look forward to go there anytime soon. I love to read, preferably on my kindle. I like to watch Game of Thrones and How I Met Your Mother as well as docus about nature. I like American football.<<BR>>
<<BR>>
my blog post :: [[https://www.youtube.com/watch?v=EzCvxKIK9SU|Best Way To Make Money]]

I'm a 38 years old and working at the high school (Industrial and Labor Relations).
In my spare time I'm trying to learn Swedish. I have been there and look forward to go there anytime soon. I love to read, preferably on my kindle. I like to watch Game of Thrones and How I Met Your Mother as well as docus about nature. I like American football.

my blog post :: Best Way To Make Money

RunningSetup (last edited 2014-08-04 16:12:49 by JimmyRetzlaff)