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

What are the ways to execute python source programs?

王林
Release: 2020-06-12 14:57:45
Original
19709 people have browsed it

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template