Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5e45213

Browse files
chapter2 finished
1 parent 360d5e5 commit 5e45213

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# 第2章 Python如何运行程序"
8+
]
9+
},
10+
{
11+
"cell_type": "markdown",
12+
"metadata": {},
13+
"source": [
14+
"## Python解释器简介"
15+
]
16+
},
17+
{
18+
"cell_type": "markdown",
19+
"metadata": {},
20+
"source": [
21+
"- 解释器是代码与机器的计算机硬件之间的软件逻辑层\n",
22+
"- 安装的"Python包"包含了一个解释器和支持的库\n",
23+
"- Python的解释器很多,如:CPython、IPython、PyPy、JPython、IronPython,使用最广泛的是CPython(参考[\\[1\\]][1])\n",
24+
"[1]:https://blog.csdn.net/orangleliu/article/details/39204897"
25+
]
26+
},
27+
{
28+
"cell_type": "markdown",
29+
"metadata": {},
30+
"source": [
31+
"## 程序执行"
32+
]
33+
},
34+
{
35+
"cell_type": "markdown",
36+
"metadata": {},
37+
"source": [
38+
"- Python文件不一定以".py"结尾,只有在被导入时才是必须的\n",
39+
"- 程序执行\n",
40+
" - 将源代码编译成字节码:字节码是源代码底层的、与平台无关的表现形式,字节码保存在.pyc文件中,保存字节码可以加快启动速度,如果只有.pyc文件,没有.py文件,程序也能执行\n",
41+
" - 字节码发送到Python虚拟机(PVM)上执行:PVM就是迭代运行字节码指令的一个大循环"
42+
]
43+
}
44+
],
45+
"metadata": {
46+
"kernelspec": {
47+
"display_name": "Python 2",
48+
"language": "python",
49+
"name": "python2"
50+
},
51+
"language_info": {
52+
"codemirror_mode": {
53+
"name": "ipython",
54+
"version": 2
55+
},
56+
"file_extension": ".py",
57+
"mimetype": "text/x-python",
58+
"name": "python",
59+
"nbconvert_exporter": "python",
60+
"pygments_lexer": "ipython2",
61+
"version": "2.7.10"
62+
}
63+
},
64+
"nbformat": 4,
65+
"nbformat_minor": 2
66+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /