How can I open Python files in IDLE from Windows?
I'm new to Python. I use Python 2.7 and I am running Windows Vista (64-bit). How do I make it when I click on .py
scripts... that it opens up in IDLE so I can edit it a snap? Ya know... without having to open IDLE by itself.
I got all the way to C:\Python27\Lib\idlelib
but I don't see the IDLE application.
Then when I do right-click and "Default open with" and select the idle.bat
file.. I get this:
Solution 1:
At least for Python 3.1 (it shouldn't be any different for 2.7), IDLE is located in C:\Python31\Lib\idlelib\idle.bat
.
So to make it open Python scripts, right-click a script, go to Open with → Choose default program, click Browse, browse to C:\Python27\Lib\idlelib
, and select idle.bat
(the extension might not show depending on your Windows settings). Remember to check the Always use selected program to open this kind of file button if it isn't checked already.
Solution 2:
Windows 7 Pro 64bit after installing python-3.5.1-amd64.exe
had the same issue no edit context after install.
To correct: Right click .py file, open with Choose default program ... then assigned to: c:\users\myusername\AppData\Local\Programs\Python\Python35\pythonw.exe
and selected "Always use the selected program to open this kind of file" & the .py files changed to the Python IDE icon & the edit context menu started showing up.