Re: [Tutor] Wrestling with the Py2exe Install, Win7[XP!], Py2.5
Things were not quite what the seem. I just tried to run a program that was not converted, and left off py. It worked. So maybe the only way to execute the compiled code is to to to dist? -- "There is nothing so annoying as to have two people talking when you're busy interrupting." -- Mark Twain ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Wrestling with the Py2exe Install, Win7[XP!], Py2.5
I suppose I'm in an interesting situation with regard to Win cmd prompt. I did this work on XP. There the facility is a bit more constraining than Win7 on my new PC. On XP, I do not have name completion w/o setting something. I only recently started with cmd prompt again. In Win7, it's automatic. There are other differences. An oddity, to me at least, name completion in W7 does not halt at the first difference. It goes all the way to completion at the first file that it can find, I think. I have to back up and try again. I think today will end my use of Python on XP. I have all files on Win7 now. I'll likely test py3exe there today to see how it behaves. What you say about the path change makes sense, but it's unfortunate the producers of py2exe haven't given some insight into this and the misc files produced in the dist folder. Of course, I have not Googled much at all on any of this. I'm glad I finally worked my way to this facility. It should help a good deal on the distribution of my demos to non-python friends, and fellow project workers at far flung places from here. On 2/19/2010 11:44 AM, Alan Gauld wrote: "Wayne Watson" wrote pylab_scatter.exe. Interestingly, if I fire it up from the Win folder, a dos-window appears and it dies. A few lines appear too quickly to read. If I execute it from the command prompt, it works fine. Still the mystery to me is why I don't need to add exe in the cmd prompt to execute it. DOS(*) automatically looks for executable file extensions (exe,com, bat etc) so you don't need to type them. You don't type cmd.exe to start a DOS shell do you? You only type cmd... I hope! (*)Actually the Windows command processor CMD.EXE Further, how did it know to look in the dist folder? Thats more interesting! It presumably added dist to the PATH environment variable. Not the Python path the DOS one - after all the EXE is not a python program any more its an exe file running under DOS. I have a comment about the tutorial. The command line shown a few lines into section 3. does not need python in the line in my case. setup.py py2exe works. That only works because you have the file asociation set to recognise .py files as associated with the interpreter. Using python explicitly removes that potential trip wire and so for a tutorial writer makes it a much safer option. HTH, -- "There is nothing so annoying as to have two people talking when you're busy interrupting." -- Mark Twain ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Wrestling with the Py2exe Install, Win7[XP!], Py2.5
"Wayne Watson" wrote pylab_scatter.exe. Interestingly, if I fire it up from the Win folder, a dos-window appears and it dies. A few lines appear too quickly to read. If I execute it from the command prompt, it works fine. Still the mystery to me is why I don't need to add exe in the cmd prompt to execute it. DOS(*) automatically looks for executable file extensions (exe,com, bat etc) so you don't need to type them. You don't type cmd.exe to start a DOS shell do you? You only type cmd... I hope! (*)Actually the Windows command processor CMD.EXE Further, how did it know to look in the dist folder? Thats more interesting! It presumably added dist to the PATH environment variable. Not the Python path the DOS one - after all the EXE is not a python program any more its an exe file running under DOS. I have a comment about the tutorial. The command line shown a few lines into section 3. does not need python in the line in my case. setup.py py2exe works. That only works because you have the file asociation set to recognise .py files as associated with the interpreter. Using python explicitly removes that potential trip wire and so for a tutorial writer makes it a much safer option. HTH, -- Alan Gauld Author of the Learn to Program web site http://www.alan-g.me.uk/ ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Wrestling with the Py2exe Install, Win7[XP!], Py2.5
Sneaky! :-) Yes, I now recall you mentioning it earlier. I'm looking at dist right now. I see a program I built in a folder above dist, pylab_scatter.exe. Interestingly, if I fire it up from the Win folder, a dos-window appears and it dies. A few lines appear too quickly to read. If I execute it from the command prompt, it works fine. Still the mystery to me is why I don't need to add exe in the cmd prompt to execute it. Further, how did it know to look in the dist folder? I checked with IDLE's path browser, and don't see it there. I'm not yet on board with the browser, but it looks like a starting point for finding py files I've run under IDLE. I looked for your post that had details, and I don't see it. I know you did post it. I had some trouble a few days ago trying to reply to one of your posts. It's not in my trash. Strange. The two directories are discussed just above section 4, right at the end of the a long output list. I missed that, since I thought the paragraph described the list, which I wasn't really interested in at the time. I would think that all the extras in dist are useful to other compiles of programs in my py folder? I have a comment about the tutorial. The command line shown a few lines into section 3. does not need python in the line in my case. setup.py py2exe works. I've glanced at section 5 and understand the basics. I'll be back to it later as needed. I didn't notice your reply in the queue this morning, and posted a msg about the disappearing file thinking there was a disconnect on the posts I had trouble with as above. I'll fix that post shortly. On 2/19/2010 5:34 AM, Robert Berman wrote: Wayne, Somewhere in the tutorial should be a comment about py2exe creating two additional directories: build and dist. Forget about the build directory. If you look in the dist directory you will find the exe file and all supporting files. If you look back to an earlier email you will see a more detailed explanation I sent you. Robert Berman -Original Message- From: Wayne Watson [mailto:sierra_mtnv...@sbcglobal.net] Sent: Thursday, February 18, 2010 11:10 PM To: Robert Berman Cc: tutor@python.org Subject: Re: [Tutor] Wrestling with the Py2exe Install, Win7[XP!], Py2.5 There's a bit of an anomaly. I've compiled 3 small programs now, and in cmd prompt a Dir does not find the file. It finds the py file, but not the completed file. Nevertheless, if I type in the prefix, the desired program executes. On 2/18/2010 4:48 PM, Wayne Watson wrote: Got it. Fooled myself. I'm converting to Win7 and have my XP keyboard and monitor side by side with the same for XP. I did the world program in XP and py2exe module in W7!! world compiled and ran successfully. Now for a bigger program with matplotlib and tkinter. Maybe I'll just settle for a small matplotlib program for the moment. VBG Thanks very much. -- "There is nothing so annoying as to have two people talking when you're busy interrupting." -- Mark Twain -- "There is nothing so annoying as to have two people talking when you're busy interrupting." -- Mark Twain ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Wrestling with the Py2exe Install, Win7[XP!], Py2.5
Wayne, Somewhere in the tutorial should be a comment about py2exe creating two additional directories: build and dist. Forget about the build directory. If you look in the dist directory you will find the exe file and all supporting files. If you look back to an earlier email you will see a more detailed explanation I sent you. Robert Berman > -Original Message- > From: Wayne Watson [mailto:sierra_mtnv...@sbcglobal.net] > Sent: Thursday, February 18, 2010 11:10 PM > To: Robert Berman > Cc: tutor@python.org > Subject: Re: [Tutor] Wrestling with the Py2exe Install, Win7[XP!], > Py2.5 > > There's a bit of an anomaly. I've compiled 3 small programs now, and > in > cmd prompt a Dir does not find the file. It finds the py file, but > not > the completed file. Nevertheless, if I type in the prefix, the > desired > program executes. > > On 2/18/2010 4:48 PM, Wayne Watson wrote: > > Got it. Fooled myself. I'm converting to Win7 and have my XP > keyboard > > and monitor side by side with the same for XP. I did the world > program > > in XP and py2exe module in W7!! > > > > world compiled and ran successfully. Now for a bigger program with > > matplotlib and tkinter. Maybe I'll just settle for a small > matplotlib > > program for the moment. VBG > > > > Thanks very much. > > > > -- > "There is nothing so annoying as to have two people > talking when you're busy interrupting." -- Mark Twain ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Wrestling with the Py2exe Install, Win7[XP!], Py2.5
There's a bit of an anomaly. I've compiled 3 small programs now, and in cmd prompt a Dir does not find the file. It finds the py file, but not the completed file. Nevertheless, if I type in the prefix, the desired program executes. On 2/18/2010 4:48 PM, Wayne Watson wrote: Got it. Fooled myself. I'm converting to Win7 and have my XP keyboard and monitor side by side with the same for XP. I did the world program in XP and py2exe module in W7!! world compiled and ran successfully. Now for a bigger program with matplotlib and tkinter. Maybe I'll just settle for a small matplotlib program for the moment. VBG Thanks very much. -- "There is nothing so annoying as to have two people talking when you're busy interrupting." -- Mark Twain ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Wrestling with the Py2exe Install, Win7[XP!], Py2.5
Got it. Fooled myself. I'm converting to Win7 and have my XP keyboard and monitor side by side with the same for XP. I did the world program in XP and py2exe module in W7!! world compiled and ran successfully. Now for a bigger program with matplotlib and tkinter. Maybe I'll just settle for a small matplotlib program for the moment. VBG Thanks very much. On 2/18/2010 4:30 PM, Wayne Watson wrote: It imported setup fine from the IDLE cmd prompt. Win Cmd prompt is fine to operate it. Just curious about IDLE. I looked in setup.py and don't see what the complaint is. It sure thinks py2exe is not available. I'm now in IDLE's path browser. I see pkgs in ...\lib\site-packages like dateutil, numdisplay, numpy, but no py2exe. Doesn't seem right, since I can import it. I'm pretty sure that during the install that py2exe was headed to site On 2/18/2010 8:25 AM, Robert Berman wrote: -Original Message- From: tutor-bounces+bermanrl=cfl.rr@python.org [mailto:tutor- bounces+bermanrl=cfl.rr@python.org] On Behalf Of Wayne Watson Sent: Wednesday, February 17, 2010 10:07 PM To: tutor@python.org Subject: Re: [Tutor] Wrestling with the Py2exe Install, Win7[XP!], Py2.5 I'm following the tutorial and ran into a snag. Here is the console output.( Can I do this from IDLE?) C:\Sandia_Meteors\Sentinel_Development\Learn_Python>c:\python25\pyth on setup.py Traceback (most recent call last): File "setup.py", line 2, in import py2exe ImportError: No module named py2exe Note the need to back pedal to c:\python25\ Perhaps I need some path variable set? -- Wayne, When you install py2exe it should insure all the required modules are available to your standard python path. For example, I am running python 2.64 and the py2exe module is in the python path. I don't use IDLE. I use Ipython however I cannot see why IDLE would not work. To tell if you are OK do import py2exe. You should have no problem loading it. If you do, reinstall it. Robert -- "There is nothing so annoying as to have two people talking when you're busy interrupting." -- Mark Twain ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Wrestling with the Py2exe Install, Win7[XP!], Py2.5
It imported setup fine from the IDLE cmd prompt. Win Cmd prompt is fine to operate it. Just curious about IDLE. I looked in setup.py and don't see what the complaint is. It sure thinks py2exe is not available. I'm now in IDLE's path browser. I see pkgs in ...\lib\site-packages like dateutil, numdisplay, numpy, but no py2exe. Doesn't seem right, since I can import it. I'm pretty sure that during the install that py2exe was headed to site On 2/18/2010 8:25 AM, Robert Berman wrote: -Original Message- From: tutor-bounces+bermanrl=cfl.rr@python.org [mailto:tutor- bounces+bermanrl=cfl.rr@python.org] On Behalf Of Wayne Watson Sent: Wednesday, February 17, 2010 10:07 PM To: tutor@python.org Subject: Re: [Tutor] Wrestling with the Py2exe Install, Win7[XP!], Py2.5 I'm following the tutorial and ran into a snag. Here is the console output.( Can I do this from IDLE?) C:\Sandia_Meteors\Sentinel_Development\Learn_Python>c:\python25\pyth on setup.py Traceback (most recent call last): File "setup.py", line 2, in import py2exe ImportError: No module named py2exe Note the need to back pedal to c:\python25\ Perhaps I need some path variable set? -- Wayne, When you install py2exe it should insure all the required modules are available to your standard python path. For example, I am running python 2.64 and the py2exe module is in the python path. I don't use IDLE. I use Ipython however I cannot see why IDLE would not work. To tell if you are OK do import py2exe. You should have no problem loading it. If you do, reinstall it. Robert -- "There is nothing so annoying as to have two people talking when you're busy interrupting." -- Mark Twain ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Wrestling with the Py2exe Install, Win7[XP!], Py2.5
> -Original Message- > From: tutor-bounces+bermanrl=cfl.rr@python.org [mailto:tutor- > bounces+bermanrl=cfl.rr@python.org] On Behalf Of Wayne Watson > Sent: Wednesday, February 17, 2010 10:07 PM > To: tutor@python.org > Subject: Re: [Tutor] Wrestling with the Py2exe Install, Win7[XP!], > Py2.5 > > I'm following the tutorial and ran into a snag. Here is the console > output.( Can I do this from IDLE?) > > C:\Sandia_Meteors\Sentinel_Development\Learn_Python>c:\python25\pyth > on > setup.py > Traceback (most recent call last): >File "setup.py", line 2, in > import py2exe > ImportError: No module named py2exe > > Note the need to back pedal to c:\python25\ > Perhaps I need some path variable set? > > -- Wayne, When you install py2exe it should insure all the required modules are available to your standard python path. For example, I am running python 2.64 and the py2exe module is in the python path. I don't use IDLE. I use Ipython however I cannot see why IDLE would not work. To tell if you are OK do import py2exe. You should have no problem loading it. If you do, reinstall it. Robert ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Wrestling with the Py2exe Install, Win7[XP!], Py2.5
I'm following the tutorial and ran into a snag. Here is the console output.( Can I do this from IDLE?) C:\Sandia_Meteors\Sentinel_Development\Learn_Python>c:\python25\python setup.py Traceback (most recent call last): File "setup.py", line 2, in import py2exe ImportError: No module named py2exe Note the need to back pedal to c:\python25\ Perhaps I need some path variable set? -- "There is nothing so annoying as to have two people talking when you're busy interrupting." -- Mark Twain ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Wrestling with the Py2exe Install, Win7[XP!], Py2.5
> -Original Message- > From: tutor-bounces+bermanrl=cfl.rr@python.org [mailto:tutor- > bounces+bermanrl=cfl.rr@python.org] On Behalf Of Wayne Watson > Sent: Wednesday, February 17, 2010 10:48 AM > To: *tutor python > Subject: [Tutor] Wrestling with the Py2exe Install, Win7[XP!], Py2.5 > > (This is the same msg as above, but I meant XP. I'm transitioning > from > XP to Win7, and am operating with two monitors and keyboards side by > side. I thought I had used W7, but nope. Corrected wrestling it > Subject.) > > I've finally decided to see if I could make an executable out of a > py > file. XP. Py2.5. I brought down the install file and proceeded with > the > install. I got two warning messages. Forgot the first. The second > said,"Could not set the key value." I again used OK. I think that > was > the only choice. It then issued a message in a larger dialog. I've > attached it here, but have had zero luck recently and in the past. > It > was about setting a key, and pointed me to a log. It mentions a > Removepy2exe -u > > Although it finished, I have no idea where the program is. It does > not > show up on the Start menu All Programs List nor my desktop. What's > up. > > I've had these messages (key) occur on other Python installs as I > transition to Win7. So far no problem. > > Hi Wayne, A few observations as I do this on Win 7 and it does work. The first thing you need to do is follow the tutorial that you should get at the web page found in the README file. If not, here it is: http://www.py2exe.org/index.cgi/Tutorial That will get you started. Now, if everything went reasonably well, you will find two folders in the folder where you ran py2exe called build and dist. Ignore build. In dist you will find the exe file and all the files necessary to run your program.gasp.sort of. There is a caveat. Sometimes you don't get all the necessary DLL's. If you are in that situation py2exe should have printed the files you still need to track down and include with your install. Now, I gave you all this information as background because we all know that really good programmers like mental and emotional pain. Well, perhaps some do. I like the easy but good way when available. Let me tell you what I use because it takes a lot of the drudgery out of the process. Go to http://code.google.com/p/gui2exe/ and download gui2exe. It will automate much of the process and it seems to do a great job of finding all the necessary files including the DLL's hidden from py2exe. I hope this helps. It is a good concept and good software. Robert Berman ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
[Tutor] Wrestling with the Py2exe Install, Win7[XP!], Py2.5
(This is the same msg as above, but I meant XP. I'm transitioning from XP to Win7, and am operating with two monitors and keyboards side by side. I thought I had used W7, but nope. Corrected wrestling it Subject.) I've finally decided to see if I could make an executable out of a py file. XP. Py2.5. I brought down the install file and proceeded with the install. I got two warning messages. Forgot the first. The second said,"Could not set the key value." I again used OK. I think that was the only choice. It then issued a message in a larger dialog. I've attached it here, but have had zero luck recently and in the past. It was about setting a key, and pointed me to a log. It mentions a Removepy2exe -u Although it finished, I have no idea where the program is. It does not show up on the Start menu All Programs List nor my desktop. What's up. I've had these messages (key) occur on other Python installs as I transition to Win7. So far no problem. -- "Crime is way down. War is declining. And that's far from the good news." -- Steven Pinker (and other sources) Why is this true, but yet the media says otherwise? The media knows very well how to manipulate us (see limbic, emotion, $$). -- WTW ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor