creating .exe file

Q

Q X

Hello everyone,

I am wondering what kind of tools are available to wrap python scripts
into just 1 .exe file (with no other files) in windows. I also want
the .exe file to be able to use command line arguments ie.
pythonprogram.exe -classpath d:/temp -file c:/hi.text

Also, is this possible to do this free ie. without a commercial
compiler like Visual Studios?

Help is greatly appreciated.

Thanks!!!!
 
L

Larry Bates

As others have stated, py2exe creates a .EXE
file consisting of all of your code. External
..pyd files (including python itself) are left
as external files. I use InnoSetup to create
a single "installation" .EXE file for distribution
but it installs all the files necessary for program
execution separately. Doesn't seem to be a problem
to me as almost all programs require that you
have additional files beyond the .EXE file itself.

You can use getopt to pick up any command line
arguments but syntax would be:

pythonprogram.exe -c d:/temp -f c:/hi.text

or

pythonprogram.exe --classpath d:/temp --file c:/hi.text

(actually you can support both in a single program)

And yes all of this is FREE!!!!

HTH,
Larry Bates
Syscon, Inc.
 
T

Thomas Heller

Peter Hansen said:
He explicitly asked for "just one .exe file (with no other files)",
but py2exe cannot do that.

Gordon McMillan's installer can do this. If you manage to find a copy
to download. Or Tools/freeze.

Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,201
Messages
2,571,047
Members
47,646
Latest member
xayaci5906

Latest Threads

Top