Python学习笔记(一)- Python如何运行脚本文件(How Python Runs Programs)

1.Python编译器是什么?

答:Python是一个程序用来运行你写的Python程序

2.Python源代码是什么?

答:源代码就是你给你的程序写的语句——它由文本文件中通常以.py扩展名结尾的文本组成

3.字节码是什么?

答:字节码就是在Python编译完你的程序后的底层形式。Python自动地用一个.pyc扩展名来储存字节码

4.PVM是什么?

答:PVM是Python虚拟机(Python Virtual Machine)——解释你编译过的字节代码的python运行时引擎。

5.说出两个或者更多Python标准执行模型的名字。

答:Psyco,Shed Skin 和 frozen binaries 是执行模型上的所有变化。另外,下面两个答案中以python命名的替代实现也以某种方式修改了模型——通过取代字节码和VMs,或者通过添加工具好JITs。

6.CPython, Jython, 和 IronPython 有什么不同?

答:CPython是Python语言的标准实现方式。Jython和IronPython分别是在Java和.NET环境中实现Python程序,他们是Python的替代编译器。

7.Stackless和PyPy是什么?
答:Stackless 是一个加强版的Python,目的在于并发,而PyPy是一个目标在于速度,重新实现Python。PyPy也是Psyco的继承者,融合了psyco首创的JIT概念。

标注:转载《Learning Python 5th Edition》[奥莱理]

1. What is the Python interpreter?
2. What is source code?
3. What is byte code?
4. What is the PVM?
5. Name two or more variations on Python’s standard execution model.
6. How are CPython, Jython, and IronPython different?
7. What are Stackless and PyPy?

1. The Python interpreter is a program that runs the Python programs you write.
2. Source code is the statements you write for your program—it consists of text in text files that normally end with a .py extension.
3. Byte code is the lower-level form of your program after Python compiles it. Python automatically stores byte code in files with a .pyc extension.
4. The PVM is the Python Virtual Machine—the runtime engine of Python that interprets your compiled byte code.
5. Psyco, Shed Skin, and frozen binaries are all variations on the execution model. In addition, the alternative implementations of Python named in the next two answers modify the model in some fashion as well—by replacing byte code and VMs, or by
adding tools and JITs.
6. CPython is the standard implementation of the language. Jython and IronPython implement Python programs for use in Java and .NET environments, respectively; they are alternative compilers for Python.
7. Stackless is an enhanced version of Python aimed at concurrency, and PyPy is a reimplementation of Python targeted at speed. PyPy is also the successor to Psyco, and incorporates the JIT concepts that Psyco pioneered.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值