How to open the py file: first determine the location of the py document to be opened; then open cmd and cd to the directory; finally enter the file name and press Enter to open and run the py file.
Recommended manual: Python basic introductory tutorial
py How to open the file?
1. A file with the suffix PY is a file with code written on it, similar to .java, .cpp, .c, etc.
This kind of py file is similar to a batch file and can be executed by double-clicking, usually by right-clicking--"Edit with IDLE" and then pressing F5 to execute.
2. Files with the suffix PY can also be opened with Python software. The specific steps are as follows:
1. First, determine where the PY document we want to open is.
#2. Open cmd, cd to the directory, enter the file name, such as test.py, and press Enter to run the file.
#3. If it is not in the directory, then we need to enter the specific address to execute.
#4. Another method is to drag the PY document directly into the window and press ENTER to execute it.
Recommended related articles:
1. How to open Python in windows
2. Android phone How to open a .py file
3. How to open a py file after python is installed
Related video recommendations:
1. Little Turtle Zero Basic introductory learning Python video tutorial
The above is the detailed content of py file?. For more information, please follow other related articles on the PHP Chinese website!