Home>Article>Backend Development> What are the ways to execute python source programs?

What are the ways to execute python source programs?

王林
王林 Original
2020-06-12 14:57:45 19608browse

What are the ways to execute python source programs?

There are three ways to execute a python program:

1. Interpreter

For example, enter: python on the command line D:/Code/Python/Hello.py

Python's interpreter: Cpython, pypy, etc.

2. Interactive

The so-called interactive means to run the interpreter directly in the terminal command without entering the file name to be executed.

Method 1. Enter ipython or ipython3 on the command line to enter the interactive shell environment. If you cannot enter, you need to install ipython and python mirroring.

Configuration method:

pip3 install ipython -i https://pypi.tuna.tsinghua.edu.cn/simple

ctrl D or exit to exit ipython.

Method 2: Enter python (official shell) in the command line window

You can directly enter the python program code here, and use exit() or ctrl D to exit.

3. Integrated development environment

such as PyCharm.

Recommended tutorial:python tutorial

The above is the detailed content of What are the ways to execute python source programs?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn