How do I set the default application to open a single file on Windows 7 and 8?

An indirect solution will be to associate .py with a batch file (or autohotkey?). The batch file should check the file name and invoke python if it is my_app.py and text editor if it is not.

Otherwise I don't think you can open one file with a certain extension with one application and the remaining files with the same extension with another application, directly in Windows. Windows sees the extension and opens the associated file. The option "Always use the selected program to open this kind of file" is just to say if you want windows to automatically open the file with this application or ask every time you double click.