August 27th, 2003, 12:55 AM
py2ede on windows~
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:
but this didnt work, any suggestions ???
from distutils.core import setup
August 27th, 2003, 09:20 AM
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!
August 27th, 2003, 10:04 PM
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 ?
August 28th, 2003, 01:55 PM
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
August 29th, 2003, 07:15 AM
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 ?
August 29th, 2003, 08:23 AM
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..
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.
python full\path\to\setup.py py2exe
Hope this is some help
August 29th, 2003, 08:34 AM
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)
python full\path\to\setup.py py2exe -d full\path\to\where\you\want\to\built\the\files