0

I know that frets on fire was made with python, but a question i have had was whenever you save something in python idle it is a .py, and you cant run them unless you have python (and if they do, they can just edit your program)
installed, but how did frets on fire make theirs an exe.

4
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by jaux
0

Thanks, its exactly what im looking for. But i need help getting it to work. I looked at their tutorial page, but it would be much better if they had a downloadable example. If someone could make a really quick example that would be a big help. Thanks

0

I think vegaseat had this posted some time ago, read the comments for instructions:

# Py2Exe version 0.6.3 setup file for console programs.
#
# If this is a windows GUI application replace the last line with
# windows = [{"script": 'myFile.py'}] )
#
# Enter the file name of your own .py code file in the last line,
# lets say it's test1.py
# so the last line should be: console = [{"script": 'test1.py'}] )
# then save this program as   p2e_test1.py  to the same directory 
# where your code file is located.
#
# Now run p2e_test1.py ...
#
# Two subfolders will be created, called  build and  dist.
# The dist folder contains your .exe file, MSVCR71.dll and 
# w9xpopen.exe (needed for os.popen() only)
# Your .exe file contains your byte code, all needed modules and
# the Python interpreter.
# The MSVCR71.dll can be distributed, but is often already in the 
# system32 folder.
# The build folder can be deleted.

from distutils.core import setup
import py2exe
import sys

# no arguments
if len(sys.argv) == 1:
    sys.argv.append("py2exe")

# creates a standalone .exe file, no zip files
setup( options = {"py2exe": {"compressed": 1, "optimize": 2, "ascii": 1, "bundle_files": 1}},
       zipfile = None,
       # replace myFile.py with your own code filename here ...
       console = [{"script": 'myFile.py'}] )
0

If I remembered right, there are some working sample setup.py's (console app, gui app, windows services app, etc.) installed with py2exe.

Take a look into py2exe's directory, you might find something really helpful.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.