Python is formally an interpreted language.Commands are executed through a piece of software known as the Python interpreter.The interpreter receives a command, evaluates that ommand,and reports the result of the command. While the interpreter can be used interactively (especially when debugging), a programmer typically defines a series of commands in advance and saves those commands in a plain text file known as source code or a script. For Python, source code is conventionally stored in a file named with the .py suffix (e.g., demo.py).


Python是一种正式的解释语言。通过执行命令的软件称为Python解释器。解释器接受一个命令,评估该命令,和报告命令的结果。而解释器可以交互地使用(尤其是在调试时),程序员通常事先定义了一系列命令,这些命令保存在一个被称为源代码或脚本的纯文本文件。对于Python,源代码通常存储在一个.py后缀的文件命名(如。demo.py)。


On most operating systems, the Python interpreter can be started by typing

python from the command line.By default, the interpreter starts in interactive mode with a clean workspace. Commands from a predefined script saved in a file (e.g., demo.py) are executed by invoking the interpreter with the filename as an argument (e.g., python demo.py), or using an additional -i flag in order to execute a script and then enter interactive mode (e.g., python -i demo.py).


在大多数操作系统上,从命令行输入Python来打开Python解释器。默认情况下,Python解释器工作在交互模式下的干净的工作空间。命令从一个预定义的脚本保存在一个文件(例如demo.py)通过调用解释器执行文件名作为参数(如,python demo.py),或者使用一个额外的-i标志,以执行一个脚本,然后进入交互模式(如。python -i demo.py)。


Many integrated development environments (IDEs) provide richer software development platforms for Python,IDLE provides an embedded text-editor with support for displaying and editing Python code, and a basic debugger,allowing step-by-step execution of a program while examining key variable values.


许多集成开发环境(IDEs)为Python开发平台提供丰富的软件,包括一个已命名IDLE附带的标准

Python 发行版。IDLE提供了一个嵌入式的文本编辑器支持显示和编辑Python代码,和一个基本的调试器,

在检查关键的变量值时允许一步一步的执行一个程序。