DonnellyOverflow
DonnellyOverflow

Reputation: 4195

How to make .py files open directly into Idle

I'm not sure what I've done but for a moment my .py files kept asking me what to open them in. They used to open straight into Idle, but now I can't get that back. I have to keep right-clicking and selecting "Edit with Idle". Does anyone know how I can get it back to opening straight into Idle.

I have looked at other sources and they told me to set the default program to a batch file in

C:\Python32\Lib\idlelib

but that opens the .py file and a blank file. Any ideas?

Upvotes: 1

Views: 2299

Answers (2)

Joran Beasley
Joran Beasley

Reputation: 113968

right click > open with... > choose default program. select idle and make sure the box to always open with is checked

I had to change my idle.bat to get it to work

@echo off
pythonw C:\Python26\Lib\idlelib\idle.pyw %1 %2 %3 %4 %5 %6 %7 %8 %9

it will open whatever you double clicked as well as a shell

Upvotes: 3

inspectorG4dget
inspectorG4dget

Reputation: 113945

Right-click on the .py file and click on the Change button right next to Opens With. Change the application to IDLE and you're done!

Upvotes: 1

Related Questions