Python IDLE won't open with .py file, only from start menu

Question:

I’ve looked through many similar questions, but no one seems to have had this same problem. I can open the IDLE shell perfectly fine from the start menu. Once in, I can use File->Open to open any .py file.

However, my problem is that if I try to open any .py file from File Explorer with IDLE, the files will run, but the IDLE application won’t come up. This especially makes it difficult to quit running when I can’t even close the application if it’s not open. It also makes it very tedious if I have to always use File->Open from the IDLE shell if I want to open a .py file. How can I at least get the Edit with IDLE option to come back?

Asked By: Daniel C Jacobs

||

Answers:

When you open the file from within IDLE, you open it in an edit window. If you try to open it from the file explorer, it will RUN it on IDLE. So that’s why you can’t just “open it” from the explorer.

I suggest that you start using some other tools to code in python. Sublime Text and Atom are great text editors, and both can be used as a python IDE.

Answered By: Julio P.C.

I had this same issue and came looking for an answer, but ended up figuring it out:
I had the issue when I downloaded the 64-bit version for windows (3.9.7), but the issue was resolved when I instead installed the 32-bit version of 3.9.7.
Now I can right-click > "Edit with IDLE"

Answered By: BirddogBlue12

The issue could be outside of Idle as I had the same behavior on OS 12.6. Restarting the Finder from the Force Quit menu resolved.

Answered By: wignition
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.