In the ArcGIS 10.1 version (it is different for previous versions, but not sure which version you are running), I have had issues trying to associate it with python.exe. Might be because I have both 32 and 64 bit versions installed.
However, this is what I had to do to get a python file associated with the "correct" python version to get it to run (associate with python.exe didn't work for me).
So, to make it work, this is what I did:
Go into Windows Explorer and right-click on a python file and select properties.
Click General tab, and you will see the Type of file: Py File (.py)
and the Opens with: *.exe
Click the Change button, then click Browse and navigate to C:\Python27\ArcGIS10.1\Lib\idlelib\idle.bat and select that file.
(in version 10.0, I have to navigate to C:\Python26\pythonw.exe to get it to work *note, not python.exe, but pythonw.exe)
Select OK to everything, and in the end, it should look like this v10.1:
[ATTACH=CONFIG]25016[/ATTACH]
or this v10.0:
[ATTACH=CONFIG]25018[/ATTACH]
This will associate the .py files with the built in python batch file that opens with the correct version of python.
When I set it up this way, if I double click a .py file, or select it from a .bat file or scheduled task, it will run it directly with the 32 bit version of python.
R_