[Tutor] Unable to open .py files directly

bob gailer bgailer at gmail.com
Wed Mar 21 16:09:05 CET 2012

On 3/21/2012 10:42 AM, Surya K wrote:
> >
> In that case, you need to change the file association of .py files to 
> Bodsda
> Yeah, I tried that. The worst part is we don't have any exe file 
> specifically for IDLE. I mean windows has to choose whether to edit or 
> compile.
> In my case, the file associated with my .py files is python.exe 
> (c:/python27/python.exe). I still don't understand why its not opening 
> in IDLE.
Try right-clicking the file. You will should geta  "context menu"

Do you see Edit with IDLE? If so, choose that.

Also take a look at the Advanced settings for the file type .py On my 
windows 2003 server in the Explorer I click Tools -> Folder Options -> 
File Types, select .py then click Advanced. Here I see
Edit with IDLE
I select that and click Edit and see
"D:\Python27\pythonw.exe" "D:\Python27\Lib\idlelib\idle.pyw" -e "%1"
in your case that should read
"C:\Python27\pythonw.exe" "C:\Python27\Lib\idlelib\idle.pyw" -e "%1"
If you don't have an Edit with IDLE entry, click New and add one.
If you want that to be the double-click behavior click Set Default.

If your OS is different the route to the file associations may be different.

Bob Gailer
Chapel Hill NC

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120321/d9597eb3/attachment-0001.html>

More information about the Tutor mailing list