1. No Profile Picture
flashing vampire
Devshed Newbie (0 - 499 posts)

Join Date
Aug 2002
Location
nowhere
Posts
19
Rep Power
0

#### py2ede on windows~

Howdy everyone~

i installed py2exe on my OS(win2k server) and want to make my python script into exe files so that others could run them without any problem. i just made a setup script with what the tuto said like this:
PHP Code:
 # setup.py from distutils.core import setup import py2exe setup(name="myscript",       scripts=["myscript.py"], )  
but this didnt work, any suggestions ???
2. Hey black,

You're gonna need to give us a lil more info, is there an error being raised or is it just not working. Also what option are you compiling it with (-c -w etc.) any other useful info you can think of would be great!

Take care,
Mark.
3. No Profile Picture
flashing vampire
Devshed Newbie (0 - 499 posts)

Join Date
Aug 2002
Location
nowhere
Posts
19
Rep Power
0
frankly i dont understand the whole procedure so well, ok i just make a file as tuto said(code is right above in my first post), the tuto said next after that i should run something like "Python setup.py py2exe" but i dunno where i should run this line, i tried to run it under Dos prompt but failed, any help ?
4. Py2exe makes a dll along with the windows executable. I'm not sure if there is an option to do without of the top of my head but normally for the exe to work you need to have the dll in the same dir.

Try double clicking the exe.. I dont see how but maybe the exe doesn't like to be run from DOS :S

Mark.
5. No Profile Picture
flashing vampire
Devshed Newbie (0 - 499 posts)

Join Date
Aug 2002
Location
nowhere
Posts
19
Rep Power
0
Originally posted by netytan
Py2exe makes a dll along with the windows executable. I'm not sure if there is an option to do without of the top of my head but normally for the exe to work you need to have the dll in the same dir.

Try double clicking the exe.. I dont see how but maybe the exe doesn't like to be run from DOS :S

Mark.
ok now the matter is i cant see any exe appears when i run that code, it must be somewhat mistake but i cant picked it out, now any suggestions ?
6. Well if the exe is not being created it cant really be run . Mmmm.. if you follow these steps you should get an exe.

First make a setup file (setup.py) then open your DOS promt and cd (change dir) to Python's directory. Next type..

Code:
python full\path\to\setup.py py2exe
The file should be names the same as your program (in your setup file). I'd then do a search for this file because I'm not exactly sure where the file is created but I remember that the last file I did with Py2exe went in my 'C:/Documents and Settings/Username' directory under windows XP. You could look under 'C:/' on other versions of windows. If not do a search, best bet.

Hope this is some help

Mark.
7. I was just looking at the docs for Py2exe on there home page. You can actually tell it where to create the files by using the -d flag like so.. (follow the first steps as in my other post but type this instead)

Code:
python full\path\to\setup.py py2exe -d full\path\to\where\you\want\to\built\the\files
http://starship.python.net/crew/theller/py2exe/

Mark.