79708895

Date: 2025-07-21 10:15:12
Score: 1.5
Natty:
Report link

I too had this issue. After reading the comment of Kenneth, I tried renaming my code from "code.py" to "script.py" and now IDLE opens it properly!

I think this behavior of the IDLE IDE is intelligent but very user unfriendly and confusing. It would be very good if IDLE would give some error messages or some dialog boxes, saying that because of this particular name of my file, it won't open the code and instead will compile an exe file for me and put it in a new folder named pycache! IDLE could also give a list of names that would trigger this behavior. This way, the user wouldn't be confused and blind.

IDLE could also ask me, saying something like "You tried to open a file that seems to be reserved for compilation. Do you want me to compile your code.py into an executable? Or do you want me to open it for you so that you can edit it?". It could give me options to do what I need, instead of refusing to open the script and instead, compiling it without even telling me!

Reasons:
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Vic