2

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. Heh.

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: alt text

Thanks!

1

Go to folder options. Click File Types. Click New. Give the extension i.e py and click OK. Under opens with, click Change button. Click Browse and select the idle.bat from the location.

This will associate idle to open py files.

This link might be helpful for Vista.

http://www.tech-recipes.com/rx/2127/vista_associate_file_type_program/#

  • Where is IDLE located at? Also I am at Vista.. I do not see File Types in my Folder Options... – test Jan 17 '11 at 4:30
  • I'm sorry. They have removed the File Types tab from folder options. The above link might be helpful. – aNish Jan 17 '11 at 4:38
  • 1
    You can find it in Start/Default Programs. – Fantasizer Jan 17 '11 at 4:38
  • I get: "Windows cannot find 'idle.pyw' – test Jan 17 '11 at 7:17
1

Delete theses keys from the registry and do repair-install from the MSI.

HKEY_CLASSES_ROOT\.PY

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.py

1

Have you tried simply right clicking the script and selecting Edit with IDLE?

  • I do not have that. – test Jan 17 '11 at 4:25
  • Ok, brainwave: try selecting pythonw.exe from the installed programs when the error window you posted pops up. – Fantasizer Jan 17 '11 at 4:32
  • OK I did that... and nothing happened... it's like I never even selected even though I FOUND IT.. and pressed OK on pythonw.exe... Weird. – test Jan 17 '11 at 4:34
1

In Windows 10:

Type "Default Programs" in the start menu. "Associate a file type or protocol with a specific program". Select ".py". Click "Change Program". Choose "Python Launcher for Windows". This worked for me even when editing the registry, right-clicking, and reinstalling Python hadn't. Thanks to @Fantasizer for the hint.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.