Search code examples
pythonlinuxpython-idle

How do I open a .py file in IDLE for editing without starting a fresh interpreter session?


Python for Windows has built in support for right clicking a .py file, and selecting, "edit with IDLE", instead of the usual action, which is running the file.

How can I accomplish this same setup on Linux? I am running Mint Julia, a Debian-type distribution. Selecting my default program from the shortcut menu will only allow me to select idle3, which will open both an interpreter with a chevron, and the file I want to edit.

Can I set up my "open with idle" selection to forgo the interpreter, until I decide to run the file?

Thanks.


Solution

  • In IDLE's menu, go to Options -> Configure IDLE... -> General. Under "At Startup" select "Open Edit Window" instead of "Open Shell Window", then hit Apply or Ok. IDLE will save this setting and from now on will open just an editor window when you open a file.