Windows file associations fix

David Raymond David.Raymond at tomtom.com
Fri Nov 9 11:01:19 EST 2018


Would some kind person be so good as to point me to instructions on how to fix Windows file associations and default programs for the various Python extensions (.py/.pyw/etc)? I know I've fixed this before after installing a new version, but didn't save the instructions, and apparently my searching skills are getting worse as the tips I'm finding at the moment aren't helping.

And why does the Python installer have a check box for "Associate files with Python" if it then promptly proceeds to destroy all those associations? Could we maybe get that part of the installer fixed for future versions?

Desired state: Double click a .py file and have it run in a new console. Being able to just type "foo.py" in a command prompt and have it run without needing to run "{python|py|explicit-python-executable} foo.py"

Currently: Windows 7. Attempting to run a .py file opens up the "Open with" dialog with a bunch of other programs listed. Clicking browse to manually select the new python.exe doesn't add it to the list and won't let me do the association.

Do have administrator permissions, did do the install "for all users", did include the py launcher, have tried repairing, reinstalling and rebooting.

Did look at the "Python on Windows FAQ" (https://docs.python.org/3/faq/windows.html#how-do-i-make-python-scripts-executable) which confirms the installer should set it up to work the way I'm looking for and had it previously.

The rest of the installation is fine, the only issue is the file associations.

Any patient assistance appreciated.

Thank you,


More information about the Python-list mailing list