只要将注册表中HKEY_CLASSES_ROOT\py_auto_file\shell\open\command的值设置为:"C:\python27\pythonw.exe" "C:\python27\Lib\idlelib\idle.pyw" -e "%1"(路径要改为自己python的安装路径)就可以完美解决了。
py文件打开方式设置为IDLE默认
原文:http://www.cnblogs.com/littlebitch/p/6437422.html