Association for .py suffix on Windows: why doesn't Python 2.0 make it use IDLE?

Lyle Johnson ljohnson at resgen.com
Fri Oct 27 13:59:09 EDT 2000


I think it's pretty standard practice in Windows that when you double-click
on a "program" (whether it's a .exe file, or a batch file, or in this case a
Python program) it runs the program; so associating the default action for
.py files with the Python interpreter (pythonw.exe) makes sense. I do agree,
however, that the "Edit" action for such files could launch IDLE on that
file. In fact, if you install PythonWin, it sets up the default "Edit"
action for Python source code to launch the PythonWin IDE.

"Jukka Korpela" <Jukka.Korpela at hut.fi> wrote in message
news:39f974d2.6490312 at news.cs.hut.fi...
> I just decided to learn Python, and I was positively surprised to see
> how nice the IDLE GUI is in Python 2.0 for Windows. But the problems is
> that Python doesn't seem to come with a nice description of how Python
> is used on Windows. I was able to figure out the basics to some extent,
> but it seems that it's unnecessarily difficult to an average Windows
> user. It's a pity that the GUI is so nice but it's difficult to get
> started with it.
>
> In particular, the installation seems to associate .py and .pym suffixes
> with pythonw.exe, with the effect that clicking on the icon of such a
> file runs the program in the simple command line mode - and the command
> line window closes automatically when the program ends. Not convenient.
>
> Changing the association manually, setting the action to
> C:\Python20\pythonw.exe C:\Python20\Tools\idle\idle.pyw "%1" %*
> (assuming the Python interpreter is in C:\Python20 of course) seems to
> make things work smoothly. But I'm afraid the average Windows user has
> some difficulties in doing that, not to mention inventing it.
>
> Am I missing something simple? Why doesn't the installer set things up
> so that such an operation is not needed?
> --
> Yucca, http://www.hut.fi/u/jkorpela/
> De gustibus et coloribus non est disputandum.





More information about the Python-list mailing list