Beginner's question...

Hans Nowak wurmy at earthlink.net
Fri Nov 23 20:14:03 EST 2001


Power-Tech wrote:
> 
> I am a very newby at phyton, actually I started messing with it two days
> ago. I have a
> question that may be so dumb that I was afraid of posting in the
> mailgroup, could anyone answer me or direct me to someone who can?
>  The problem is:
> I create a small program with the Python IDLE gui, save it as a .py
> file, when I double click to open the file, a DOS window opens but
> closes immediately, without running the program, or if it is a
> calculating program, as soon as I type something, the window closes.

Yeah, that's pretty annoying. People already pointed out a few ways
to get around this. Here's another: write a batch file that starts
a python program, e.g. 

@echo off
c:\python\python.exe %*
pause

Then edit the associations of the .py file extension, so that this
batchfile is started and not python.exe. Double-clicking a .py
file should now wait for a keypress after running the program, even
when errors occur.

HTH,

--Hans



More information about the Python-list mailing list