943,895 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Unsolved
  • Views: 648
  • Python RSS
Apr 13th, 2008
0

-completly new- Exe question

Expand Post »
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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
killingcheese is offline Offline
2 posts
since Apr 2008
Apr 13th, 2008
0

Re: -completly new- Exe question

Use py2exe.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
farsheed is offline Offline
1 posts
since Mar 2008
Apr 13th, 2008
0

Re: -completly new- Exe question

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
killingcheese is offline Offline
2 posts
since Apr 2008
Apr 13th, 2008
0

Re: -completly new- Exe question

I think vegaseat had this posted some time ago, read the comments for instructions:
python Syntax (Toggle Plain Text)
  1. # Py2Exe version 0.6.3 setup file for console programs.
  2. #
  3. # If this is a windows GUI application replace the last line with
  4. # windows = [{"script": 'myFile.py'}] )
  5. #
  6. # Enter the file name of your own .py code file in the last line,
  7. # lets say it's test1.py
  8. # so the last line should be: console = [{"script": 'test1.py'}] )
  9. # then save this program as p2e_test1.py to the same directory
  10. # where your code file is located.
  11. #
  12. # Now run p2e_test1.py ...
  13. #
  14. # Two subfolders will be created, called build and dist.
  15. # The dist folder contains your .exe file, MSVCR71.dll and
  16. # w9xpopen.exe (needed for os.popen() only)
  17. # Your .exe file contains your byte code, all needed modules and
  18. # the Python interpreter.
  19. # The MSVCR71.dll can be distributed, but is often already in the
  20. # system32 folder.
  21. # The build folder can be deleted.
  22.  
  23. from distutils.core import setup
  24. import py2exe
  25. import sys
  26.  
  27. # no arguments
  28. if len(sys.argv) == 1:
  29. sys.argv.append("py2exe")
  30.  
  31. # creates a standalone .exe file, no zip files
  32. setup( options = {"py2exe": {"compressed": 1, "optimize": 2, "ascii": 1, "bundle_files": 1}},
  33. zipfile = None,
  34. # replace myFile.py with your own code filename here ...
  35. console = [{"script": 'myFile.py'}] )
Reputation Points: 625
Solved Threads: 211
Posting Virtuoso
Ene Uran is offline Offline
1,704 posts
since Aug 2005
Apr 13th, 2008
0

Re: -completly new- Exe question

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.
Reputation Points: 10
Solved Threads: 2
Newbie Poster
jaux is offline Offline
15 posts
since Oct 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: Complete noob - ping in python
Next Thread in Python Forum Timeline: Autoupdater in wxPython





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC