Click Start Menu, and then type regedit in the Start Search and press ENTER.
Navigate to the following registry branch HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\[ext].
Replace the [ext] with the actual file extension that you want to restore its file type association to revert back to original Windows Vista default. If you unsure, simply browse through all the sub-key under FileExts.
Delete the sub-key named UserChoice.
Exit from Registry Editor.
Windows Vista will now use original file associations that comes built into system for the particular file extensions with “UserChoice” deleted.
However, the trick is not foolproof, especially if the other related system registry keys for the particular extension have been corrupted or broken. In such cases, it may be necessary to fix the file association by restoring its registry settings.
The reset part is detailed in this article:
To change a file association:
Go Start -> Default Programs
Choose Associate a file type or protocol with a program
Select your .py extension and click Change program...
Choose the executable you want to run your .py files.