I tried removing .py extension from file.py name and then ran command python file python can understand the code without any extension for single file, but if you use modules then you need to use .py extension. Else you can add .py to path text in enviornment variables and run 
 
assoc .py=Python.File 
ftype Python.File=c:\path to \python.exe "%1" %*