Home >Backend Development >Python Tutorial >What are the ways to execute python source program?
The ways to execute the python source program are: 1. Enter ipython or ipython3 on the command line to enter the interactive shell environment; 2. Enter python [official shell] on the command line window; 3. Integrated development environment, PyCharm Similar to IDEA.
#1. The Python source program is a text file in a special format. You can use any text editor software to develop python. The file extension of python is. py
2. Three ways to execute python programs
Interpreter: Use command line input: For example, enter python D:/Code/Python/Hello.py
python Interpreter: Cpython, pypy, etc.
Interactive: so-called interactive: run the interpreter directly in the terminal command without entering the file name to be executed
The first way: in Enter ipython or ipython3 on the command line to enter the interactive shell environment. article/details/80178996
Configuration method: pip3 install ipython -i https://pypi.tuna.tsinghua.edu.cn/simple
ctrl D or exit to launch ipython
ipython's advantages: Support automatic completion and execution of linux commands
:
Enter Python (official shell)
## here in the command line window You can directly enter the python program code and exit using exit() or ctrl DThe third way: Integrated development environment: PyCharm similar to IDEARecommended tutorial: "PythonTutorial
》The above is the detailed content of What are the ways to execute python source program?. For more information, please follow other related articles on the PHP Chinese website!