Python Executable (Py2Exe)

Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Oct 2006
Posts: 2,564
Reputation: mattyd is an unknown quantity at this point 
Solved Threads: 1
Featured Poster
mattyd's Avatar
mattyd mattyd is offline Offline
Posting Maven

Python Executable (Py2Exe)

 
0
  #1
Dec 25th, 2006
Hello:

** I have been researching and experimenting with this with tutorials from many sources but can not even begin it to get it to work it seems.

I have a very small yet important Python program that I must make into an executable file within a week's time or so; my boss leaves for Tokyo to meet with a large video game company and this will be a simple game promo which will be transported via a laptop.

I have all the correct files (as far as I can tell) necessary to create a Py2Exe file but I am unable to build it: some tutorials deal only with Command Line (my system cannot find the right files using this for some odd reason + I am not greatly proficient with Command Line, unfortunately)

Everything I have read lauds Py2Exe's ease of use but I find this to be to the contrary. Making executables from Python seems like a great touch to finish off a program especially for a professional presentation. I would really like to figure this out. It is most important.

I only need assistance with the exe-- the program is in itself complete.

Thank-you in advance very much to anyone that can help me solve this.

sharky_machine
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 1,546
Reputation: Ene Uran has a spectacular aura about Ene Uran has a spectacular aura about 
Solved Threads: 174
Ene Uran's Avatar
Ene Uran Ene Uran is offline Offline
Posting Virtuoso

Re: Python Executable (Py2Exe)

 
0
  #2
Dec 26th, 2006
1) Py2Exe is not easy to use!

2) Have you looked at the Py2Exe snippet at Daniweb? That should make it easier to use!

3) Have you been able to package any Python code into an exe?

4) Your program might be small, but there are some 'outhouse' modules that don't do well.
drink her pretty
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,647
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 473
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: Python Executable (Py2Exe)

 
1
  #3
Dec 26th, 2006
Hey Sharky, maybe something like this is what you are looking for.
I don't accept change; I don't deserve to live.

Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 2,564
Reputation: mattyd is an unknown quantity at this point 
Solved Threads: 1
Featured Poster
mattyd's Avatar
mattyd mattyd is offline Offline
Posting Maven

Re: Python Executable (Py2Exe)

 
0
  #4
Dec 26th, 2006
Ene Uran & ~S.O.S.~ :

Thank-you for your replies.

I am going to try the [Daniweb] snippet (it looks promising) and also I am going to try the link that ~S.O.S.~ supplied . Between both of these, I will hopefully get some results.

Thanks again for your help. Much appreciated

Regards,

sharky_machine
Last edited by mattyd; Dec 26th, 2006 at 3:13 pm. Reason: sp
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 2,564
Reputation: mattyd is an unknown quantity at this point 
Solved Threads: 1
Featured Poster
mattyd's Avatar
mattyd mattyd is offline Offline
Posting Maven

Re: Python Executable (Py2Exe)

 
0
  #5
Dec 26th, 2006
Originally Posted by sharky_machine View Post
Ene Uran & ~S.O.S.~ :

Thank-you for your replies.

I am going to try the [Daniweb] snippet (it looks promising) and also I am going to try the link that ~S.O.S.~ supplied . Between both of these, I will hopefully get some results.
I am trying the Daniweb snippet right now; did not get far: When I run the initial snippet I am told that the py2exe module does not exist. The original, downloaded py2exe file is in my Python working folder with the prepared code snippet saved as .py . I am not sure why it is not being recognized.

Using: py2exe-0.6.5.win32-py2.5, Python 2.4.3 (IDLE)

sharky_machine
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,647
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 473
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: Python Executable (Py2Exe)

 
0
  #6
Dec 26th, 2006
Originally Posted by sharky_machine View Post
Using: py2exe-0.6.5.win32-py2.5, Python 2.4.3 (IDLE)
Originally Posted by From ~s.o.s~'s link
There's your problem. IDLE was never quite finished. The Run Module in the Run menu doesn't pass any command line arguments that way that other IDEs do. Follow all the steps in tutorial.

Maybe you should just read the link I posted and the original thread.
I don't accept change; I don't deserve to live.

Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 2,564
Reputation: mattyd is an unknown quantity at this point 
Solved Threads: 1
Featured Poster
mattyd's Avatar
mattyd mattyd is offline Offline
Posting Maven

Re: Python Executable (Py2Exe)

 
0
  #7
Dec 26th, 2006
Originally Posted by ~s.o.s~ View Post

Maybe you should just read the link I posted and the original thread.
~s.o.s.~

Will do right now.

thanks.
sharky_machine
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 1,546
Reputation: Ene Uran has a spectacular aura about Ene Uran has a spectacular aura about 
Solved Threads: 174
Ene Uran's Avatar
Ene Uran Ene Uran is offline Offline
Posting Virtuoso

Re: Python Executable (Py2Exe)

 
0
  #8
Dec 26th, 2006
You should have 2 files, let's say your p2e templet file p2e_test1.py modified with your code filename, and your code file test1.py. Save these 2 files in the same directory and just douple-click on p2e_test1.py

That's really all there is to it!

Otherwise make sure the Python versions match, you seem to be using Python 2.5. I avoid IDLE as an IDE, just too primitive!
drink her pretty
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 2,564
Reputation: mattyd is an unknown quantity at this point 
Solved Threads: 1
Featured Poster
mattyd's Avatar
mattyd mattyd is offline Offline
Posting Maven

Re: Python Executable (Py2Exe)

 
0
  #9
Dec 26th, 2006
Originally Posted by Ene Uran View Post
You should have 2 files, let's say your p2e templet file p2e_test1.py modified with your code filename, and your code file test1.py. Save these 2 files in the same directory and just douple-click on p2e_test1.py

That's really all there is to it!

Otherwise make sure the Python versions match, you seem to be using Python 2.5. I avoid IDLE as an IDE, just too primitive!
I avoid IDLE also until last night (I always use DrPython to build); for some unexplained reason, after closing DrPython, rebooting my system, and tring to reopen a current project, DrPython would not open :surprised -- only the flash of a black console... nothing. I panicked for a moment but was too busy to fool with this problem. I opened IDLE and continued. Cannot let myself to be slowed down when I'm in the deep zone of coding and producing well. :cheesy:

I am tring to get this exe file from my program up and running-- I find it a bit confusing. Had no idea it would take so much to produce an exe. I am learning a lot, though, so that's what is important.

Regards,
Matty D.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 2,564
Reputation: mattyd is an unknown quantity at this point 
Solved Threads: 1
Featured Poster
mattyd's Avatar
mattyd mattyd is offline Offline
Posting Maven

Re: Python Executable (Py2Exe)

 
0
  #10
Dec 26th, 2006
Originally Posted by sharky_machine View Post
~s.o.s.~

Will do right now.

thanks.
sharky_machine
I am trying this now via your link; so far my results are as follows:
  • 1 buildHelloWorld directory folder: empty
  • 1 HelloWorld.spec file
I think I am on the right track at least-- something is working here, but no exe file as stated in the tutorial link. When the bat file is run, it flashes for about 1.5-seconds then dissapears. I assume the bat is running up unto a certain point and cannot execute a particular command past this point, then closes.

I am going to look this over and try to figure it out.

sharky_machine
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the Python Forum
Thread Tools Search this Thread



Tag cloud for Python
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC