944,221 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Marked Solved
  • Views: 8174
  • Python RSS
You are currently viewing page 1 of this multi-page discussion thread
Dec 25th, 2006
0

Python Executable (Py2Exe)

Expand Post »
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
Featured Poster
Reputation Points: 105
Solved Threads: 1
Posting Maven
mattyd is offline Offline
2,582 posts
since Oct 2006
Dec 26th, 2006
0

Re: Python Executable (Py2Exe)

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.
Reputation Points: 625
Solved Threads: 211
Posting Virtuoso
Ene Uran is offline Offline
1,704 posts
since Aug 2005
Dec 26th, 2006
1

Re: Python Executable (Py2Exe)

Hey Sharky, maybe something like this is what you are looking for.
Super Moderator
Featured Poster
Reputation Points: 3244
Solved Threads: 719
Failure as a human
~s.o.s~ is offline Offline
8,873 posts
since Jun 2006
Dec 26th, 2006
0

Re: Python Executable (Py2Exe)

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
Featured Poster
Reputation Points: 105
Solved Threads: 1
Posting Maven
mattyd is offline Offline
2,582 posts
since Oct 2006
Dec 26th, 2006
0

Re: Python Executable (Py2Exe)

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
Featured Poster
Reputation Points: 105
Solved Threads: 1
Posting Maven
mattyd is offline Offline
2,582 posts
since Oct 2006
Dec 26th, 2006
0

Re: Python Executable (Py2Exe)

Using: py2exe-0.6.5.win32-py2.5, Python 2.4.3 (IDLE)
Quote 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.
Super Moderator
Featured Poster
Reputation Points: 3244
Solved Threads: 719
Failure as a human
~s.o.s~ is offline Offline
8,873 posts
since Jun 2006
Dec 26th, 2006
0

Re: Python Executable (Py2Exe)

Click to Expand / Collapse  Quote originally posted by ~s.o.s~ ...

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

Will do right now.

thanks.
sharky_machine
Featured Poster
Reputation Points: 105
Solved Threads: 1
Posting Maven
mattyd is offline Offline
2,582 posts
since Oct 2006
Dec 26th, 2006
0

Re: Python Executable (Py2Exe)

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!
Reputation Points: 625
Solved Threads: 211
Posting Virtuoso
Ene Uran is offline Offline
1,704 posts
since Aug 2005
Dec 26th, 2006
0

Re: Python Executable (Py2Exe)

Click to Expand / Collapse  Quote originally posted by Ene Uran ...
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.
Featured Poster
Reputation Points: 105
Solved Threads: 1
Posting Maven
mattyd is offline Offline
2,582 posts
since Oct 2006
Dec 26th, 2006
0

Re: Python Executable (Py2Exe)

~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
Featured Poster
Reputation Points: 105
Solved Threads: 1
Posting Maven
mattyd is offline Offline
2,582 posts
since Oct 2006

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

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: Sorting student info Problem
Next Thread in Python Forum Timeline: list in another list





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


Follow us on Twitter


© 2011 DaniWeb® LLC