In the Python language, everything is an object a program can access, including simple types that hold integers, as well as the actual code you write and its representation in the Python interpreter.
在Python语言中,所有事物都是程序可以访问的对象,其中包括保存整数的简单类型,以及您编写的实际代码和这些代码在Python解释器中的表示。
As always, for more information about a Python topic, you can use the built-in help interpreter. For example, Listing 2 shows the start of the help description for the list class.
与往常一样,要获取有关Python主题的更多信息,您可以使用内置的帮助解释器,例如,清单2展示了如何开始list类的帮助描述。
Sys contains data and methods for interacting with the Python interpreter.
sys包含用于与Python解释器交互的数据和方法。
The Python interpreter, at its simplest level, operates in a similar manner, starting at the top of a program and sequentially executing program statements in a linear fashion.
Python解释器在其最简单的级别,以类似的方式操作,即从程序的顶端开始,然后一行一行地顺序执行程序语句。
The order of mappings in a Python dictionary is arbitrary and can vary across different Python installations or even from running the same code more than once using the same Python interpreter.
Pythondictionary中映射的次序是任意的,对于不同的 Python安装可能会有变化,甚至多次使用同一 Python解释器运行相同代码也会有变化。
If you don't specify all of the parameters during a function invocation; you must explicitly name the parameters you're specifying so the Python interpreter can properly call the function.
如果您在函数调用期间未指定全部参数,则必须显式地写出您所指定的参数的名称,以使Python解释器能够正确地调用函数。
The shell and its underlying library are written in Python, and PSSH is easy to install assuming that your system already has the Python interpreter and core libraries (see Listing 3).
这个shell和它的底层库是用Python编写的,如果系统上已经安装了Python解释器和核心库,就很容易安装它(见清单3)。
This simplicity demonstrates one of the primary benefits of using the Python interpreter.
这种简单性就是使用Python解释器的主要优点之一。
The Python interpreter supports interactive execution of Python code.
Python解释器支持Python代码的交互式执行。
This line of thinking will then lead you to a module called perlmodule, which lets you embed a perl interpreter in Python.
这种思维模式将把您带到一个名为perlmodule的模块,它支持在Python中嵌入一个perl解释器。
To run the statements in this file, you need to start a Python interpreter and tell it to read and process the contents of the file.
要运行本文件中的语句,您需要启动一个Python解释器,并让它去读取和处理文件的内容。
Run-time variables are simply the raw bytecodes and object structures that the regular Python interpreter handles.
运行时变量只是常规Python解释器处理的原始字节码和对象结构。
Once you've done so, start a new Python interpreter in the directory where you saved test.py, and enter the Python statements shown in Listing 6.
完成上一步后,在您保存test .py的目录中启动一个新的Python解释器,然后输入如清单6所示的语句。
On UNIX-based operating systems, this line causes the Python interpreter to start up automatically and process the statements in the file before terminating.
在基于UNIX的操作系统中,本行会使Python解释器自动启动,并在终止前处理文件中的语句。
When a module is imported, the Python interpreter processes each line in the module file.
导入一个模块时,Python解释器会处理模块文件内的各行。
For one thing, that it's easy to get help from the Python interpreter, but more on that later.
只有一个事情,那就是可以方便地从Python解释器中得到帮助,但是从后面部分可以获得更多帮助。
If you haven't already done so, fire up a Python interpreter and try some of the ideas I've discussed.
如果您尚未理解,则请启动一个Python解释器,并尝试按照我上面讨论的方法操作。
The Python interpreter provides the only two bool objects needed: True and False.
Python解释器提供这仅有的(也是必需的)两个bool对象:True和False。
On the first line, you see what's called the hash-bang line, which identifies the location of the Python interpreter.
在第一行中,您可以看到一个 hash-bang 行:它用于标识Python解释器的位置。
It then proceeds to take the remainder of the file as input to the Python interpreter.
然后,它将文件剩下的部分作为Python解释器的输入。
This can easily change with a new Python interpreter, so it's important that you never rely on items being in a specific order within a dictionary.
新的Python解释器很容易改变这一次序,所以一定不要依赖于元素在dictionary中的特定次序。
Name the configuration something like "pythonInteractive", set the Location to point to your Python interpreter, and pass "-i" as the single argument (see Figure 7).
将该配置命名为诸如 "pythonInteractive"之类,然后设置Location,令其指向您的Python解释器,接着,将 "-i"作为唯一的参数传递进来(请参阅图7)。
The Python interpreter output is displayed in the Console view.
Python解释器的输出显示在Console视图中。
The pytext embedded Python interpreter
pytext嵌入式Python解释器
For example, when you open a new Python interpreter, you must type in all the functions previously created.
例如,当您打开一个新的Python解释器时,必须键入之前所创建的所有函数。
To find out more about how to use a dictionary in Python, you can use the built-in help interpreter to learn about the dict class, as shown in Listing 2.
要进一步了解如何使用Python中的dictionary,可以使用内置的帮助解释器来了解dict类,如清单2所示。
You can test that you have version 0.5.x by issuing this command in the IPython, or regular Python, interpreter.
您可以测试自己的版本是否为 0.5.x,方法是在IPython或普通Python解释器中发起以下命令。
If you want to know more about the help facilities within Python, just enter help at a command prompt in the Python interpreter to access the interactive help utility (see Listing 4).
如果您想详细了解Python内的help工具,只需在Python解释器中的命令提示符下键入help,就可以访问交互式的帮助工具(参见清单4)。
You can classify all the Python classes below the PyObject class into four main categories that the Python run-time interpreter USES.
可以将pyobject类之下的所有python类划分为Python运行时解释器可以使用的四个主要类别。
You can classify all the Python classes below the PyObject class into four main categories that the Python run-time interpreter USES.
可以将pyobject类之下的所有python类划分为Python运行时解释器可以使用的四个主要类别。
应用推荐