This article mainly introduces how to right-click the Python file and find the IDLE option. This article uses the registry to solve this problem. if you need it, you can refer to it and double-click it. the py file cannot run, or the right-click file does not have an IDLE edit item, which is common in Windows 7.
Double-click the *. py file to run it. solution:
Right click-> open mode-> select default program-> view, find and select python.exe
Right-click there is no IDLE item solution:
1. if the PYTHON environment is not built soon, and there are not many library files in the PYTHONPATH and Lib/site-packages directories, you can reinstall
2. modify the registry,
I. use the regedit command to modify the registry
The code is as follows:
[HKEY_CLASSES_ROOT \ Python. File \ shell \ EditwithIDLE]
[HKEY_CLASSES_ROOT \ Python. File \ shell \ EditwithIDLE \ command]
Ii. modify the registry using a batch file
The code is as follows:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT \ Python. File \ shell \ EditwithIDLE]
@ = "& Edit with IDLE"
[HKEY_CLASSES_ROOT \ Python. File \ shell \ EditwithIDLE \ command]
@ = "\" C :\\ Python27 \ pythonw.exe \ "\" C :\\ Python27 \ Lib \ idlelib \ idle. pyw \ "-e \" % 1 \""
Save the preceding file to python. reg. double-click the File to modify the registry and restart the file.
NOTE: replace it with your own PYTHON installation directory.