problems when starting python

Chris Gonnerman chris.gonnerman at newcenturycomputers.net
Thu Nov 8 08:54:30 EST 2001


----- Original Message ----- 
From: "barabba" <barabba72 at hotmail.com>


> Hi,
> 
> this is driving me crazy !!!
> if I create file containing print "hi" and name it test.pyw and then
> click on it with the right button it says edit with IDLE but then
> nothing happen when i click on this item.

Can't explain this, as I never use IDLE.

> If I double click on the file to run it...same...nothing happens !!!
> why ????

This has been answered already, but I'll answer it again.  Follow:

    .py  files are executed by python.exe
    .pyw files are executed by pythonw.exe

And:
   
    python.exe  opens a console window
    pythonw.exe does not open a console window
 
So:

    print "hi"

in a file with a .pyw extension will appear to do NOTHING.

in a file with a .py extension will show a console window with

    hi

in it.  This window may disappear almost immediately, though, 
depending on your system settings.  Try putting this in a .py file
and running it:

    print "hi"
    raw_input()

> I have python at home and it works fine but I have noticed that even
> there IDLE starts fine if I run it from start | programs | IDLE but if
> I start it from the program icon (c:\winnt\etc etc) it doesn't
> start...why ????

What is the "program icon" (application file) doing in THAT folder?
It should be in C:\Python21\Tools\idle, named idle.pyw.

> Thank you
> Barabba

Good luck.






More information about the Python-list mailing list