Unfortunately, this is a multi-step process.

Step 1. Showing Hidden Files

First we need to ask Windows to show to us all hidden files and folders. First open a File Explorer window. Click on the View button, then click on Show and click on Hidden item. A checkbox will appear.

Step 1 Screenshot

Step 2. Modifying the Default App

Now we need to open up the Settings application. Once there, click on the Apps menu, then click on Default apps.

Step 2 Screenshot

Step 3 Screenshot

Step 4 Screenshot

In the box that says “enter a file type or link type” type .py and select it from the resulting dropdown. Then click on the box right below. A popup window will appear. Scroll to the bottom of the window and select Chose an app on your PC.

Step 5 Screenshot

In the resulting window, you need to navigate to your user folder.

Make sure to click Set Default or you’ll have to repeat all of those steps!

Ta dah! You’re all done. Now when you double click on a .py file it’ll open in IDLE.