[Tutor] Pyexe
Liam Clarke
ml.cyresse at gmail.com
Sat Mar 4 12:16:01 CET 2006
Hi Ryan,
It took me about a year to cotton onto it as well.
So, I wrote a script for my friend, and wanted to send it as an exe.
The script I wrote was called disco_spider.py.
I assume you've installed py2exe?
What I then had to do was create another Python script called setup.py
in the same directory as disco_spider.py, this is what setup.py looks
like:
from distutils.core import setup
import py2exe
setup(
# The first three parameters are not required, if at least a
# 'version' is given, then a versioninfo resource is built from
# them and added to the executables.
version = "0.5.0",
description = "Custom built copier of things.",
name = "Disco Spider",
# targets to build
console = ["disco_spider.py"]
)
After that, I open up a DOS prompt, and go to the directory
disco_spider.py and setup.py are in and I type:
python setup.py py2exe
at the command prompt. This runs py2exe, which, if everything goes
well, creates a subfolder called dist. Everything in dist is what you
need to distribute your script.
Good luck,
Liam Clarke
On 3/4/06, ryan luna <ryan_gm at sbcglobal.net> wrote:
> Hello, Call me a complete n00b but i dont understand
> how to get Pyexe to work,
> Iv read the site and kinda just confuses me, as you
> can prolly tell im still pretty new to programming,
> What exactly do i have to do with pyexe to make python
> scripts exacutables.
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
More information about the Tutor
mailing list