Associate Python Files with IDLE

We’re working on some new Python courses and, although students will be able to use their IDE of choice, we plan to use IDLE as the default editor. To make it easier to open files directly into IDLE from Windows Explorer, I associated Python files with IDLE. As IDLE doesn’t come up as one of the default options for editing Python, it’s not as intuitive as it might be, but it’s pretty simple. Here’s how you do it:

To associate Python files with IDLE on Windows 8:

  1. Go to a folder that contains a Python file.
  2. Right-click on any Python file.
  3. Select Properties.
  4. Next to the section that says “Opens with”, click the Change button.
  5. You may need to select More Options.
  6. Click on Look for another app on this PC.
  7. Navigate to where you installed Python. For me, that’s the Python34 folder on the C drive.
  8. Open Lib
  9. Open idlelib
  10. Select the idle.bat file.
  11. Click Open.
  12. Click OK to close out of Properties.
  13. Now you can open .py files in IDLE simply by double-clicking on them.
About Webucator

Webucator provides instructor-led training to students throughout the US and Canada. We have trained over 90,000 students from over 16,000 organizations on technologies such as Microsoft ASP.NET, Microsoft Office, Azure, Windows, Java, Adobe, Python, SQL, JavaScript, Angular and much more. Check out our complete course catalog.