Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm learning python on x64 windows 7 machine. But after installing and uninstalling python 2.7 and 3.2 a few times too many (i just found out 3.x doesn't support some of the 3rd party libraries like PIL), i have lost .py file association(when i double click my python scripts, windows asks me to choose a program to open it with instead of making python interpret it). How can i fix the issue?

share|improve this question

migrated from stackoverflow.com Sep 23 '12 at 22:11

This question came from our site for professional and enthusiast programmers.

This is not a programming question. Fixing this is done the same way you'd fix it any other time you had it. –  kindall Sep 23 '12 at 17:45
"you'd fix it any other time you had it"?? –  user1470033 Sep 23 '12 at 18:06
double-click again, lead Windows to pythonw.exe, and check the option that tells Windows to use it for all future .py files as well. –  alexis Sep 23 '12 at 18:39

1 Answer 1

up vote 1 down vote accepted

considering you've already set the path in environment variables:

open command prompt:

cd to the directory which contains lost.py and then type:

python lost.py and hit enter.

or using IDLE:

start IDLE --> press CTRL+O --> open your file --> press F5

share|improve this answer
why the downvote? –  Ashwini Chaudhary Sep 23 '12 at 18:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.