How to use py2exe ...

S

Santiago Romero

Hi...

I'm a Linux user, and I would like some windows-friends to test a
game I'm writing with python+pygame without they needing to install
python, pygame, and so on.

I've heard about py2exe and pygame2exe, but I'm not sure on how to
use them to create:

a.- standalone exe files with a single .py program.
Example: myprogram.py

or

b.- exe files containing all my source code + data directories (png
files, data files, and so).
Example: main.py, doc/README, src/*.py and data/*


The problem is I'm not sure on how to use py2exe and pygame2exe to
build the executables...

And finally, a question: if I want to provide source code
separately ... can I include .pyc files instead of .py files?
 
D

DHR

Here is how I am creating my win32 exe with py2exe:
1. create a setup.py file with the following:
from distutils.core import setup
import py2exe

#setup(console=['main_script.py'])
setup(windows=['main_script.py'] )

2. run the following command from console: 'python setup.py py2exe'

Hope this helps.
 
M

Mike Driscoll

Hi...

I'm a Linux user, and I would like some windows-friends to test a
game I'm writing with python+pygame without they needing to install
python, pygame, and so on.

I've heard about py2exe and pygame2exe, but I'm not sure on how to
use them to create:

a.- standalone exe files with a single .py program.
Example: myprogram.py

or

b.- exe files containing all my source code + data directories (png
files, data files, and so).
Example: main.py, doc/README, src/*.py and data/*

The problem is I'm not sure on how to use py2exe and pygame2exe to
build the executables...

And finally, a question: if I want to provide source code
separately ... can I include .pyc files instead of .py files?

You should also check out the py2exe website as it has a tutorial, a
link to their mailing list, etc:

http://www.py2exe.org/

Mike
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top