This project has moved. For the latest updates, please go here.

Add File Extension To editor

May 24, 2011 at 10:58 PM

Hi, I have some files that contain python with a file extension other then .py. I expected to be able to set them to use the python editor by clicking Tools -> Options -> Text Editor -> File Extension.  Then select the Python Editor, but the python editor is not in the list.  Is there another way to do this?


Aug 9, 2011 at 4:13 PM

You have to do some registry editing to do this.  This is for Visual Studio 2010:

Go to this key in the registry:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Languages\File Extensions\.py

Copy the CLSID you see there and create a new key having the desired extension and paste the value in this new key.

You can also set extensionless files to python, like SConscript for SCons, by editing this key:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Languages\Extensionless Files\

you then add the CLSID for python and below it, you create empty string value for each file name.