Skip to content

Commit 8bb37dc

Browse files
committed
change html to rst
1 parent 2d701f2 commit 8bb37dc

File tree

151 files changed

+209
-27265
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+209
-27265
lines changed

_templates/layout.html

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{% extends "!layout.html" %}
2+
3+
{% block sidebarsearch %}
4+
{{ super() }}
5+
6+
just for test!
7+
8+
{% endblock %}
9+
10+
{% block footer %}
11+
<div style="right">
12+
<script type="text/javascript"><!--
13+
google_ad_client = "ca-pub-3421553373953599";
14+
/* 评论上方 */
15+
google_ad_slot = "2110492886";
16+
google_ad_width = 728;
17+
google_ad_height = 90;
18+
//-->
19+
</script>
20+
<script type="text/javascript"
21+
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
22+
</script>
23+
</div>
24+
25+
<script type="text/javascript">
26+
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
27+
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F9adc7a1c86496c8e2bc61c4f8fc92d30' type='text/javascript'%3E%3C/script%3E"));
28+
</script>
29+
30+
{% endblock %}

appetite.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
.. _tut-intro:
2+
3+
**********************
4+
开胃菜
5+
**********************
6+
7+
如果你要用计算机做很多工作,最后你会发现有一些任务你更希望用自动化的方式进行处理。 比如,你想要在大量的文本文件中执行查找/替换,或者以复杂的方式对大量的图片进行重命名和整理。 也许你想要编写一个小型的自定义数据库、一个特殊的 GUI 应用程序或一个简单的小游戏。
8+
9+
如果你是一名专业的软件开发者,可能你必须使用几种 C/C++/JAVA 类库,并且发现通常编写/编译/测试/重新编译的周期是如此漫长。 也许你正在为这些类库编写测试用例,但是发现这是一个让人烦躁的工作。 又或者你已经完成了一个可以使用扩展语言的程序,但你并不想为此重新设计并实现一套全新的语言。
10+
11+
那么 Python 正是你所需要的语言。
12+
13+
虽然你能够通过编写 Unix shell 脚本或 Windows 批处理文件来处理其中的某些任务,但 Shell 脚本更适合移动文件或修改文本数据,并不适合编写 GUI 应用程序或游戏; 虽然你能够使用 C/C++/JAVA 编写程序,但即使编写一个简单的 first-draft 程序也有可能耗费大量的开发时间。 相比之下,Python 更易于使用,无论在 Windows、Mac OS X或Unix 操作系统上它都会帮助你更快的完成任务。
14+
15+
虽然 Python 易于使用,但它却是一门完整的编程语言;与 Shell 脚本或批处理文件相比,它为编写大型程序提供了更多的结构和支持。 另一方面,Python 提供了比 C 更多的错误检查,并且作为一门 * 高级语言* ,它内置支持高级的数据结构类型,例如:灵活的数组和字典。 因其更多的通用数据类型,Python 比 Awk 甚至 Perl 都适用于更的多问题领域,至少大多数事情在 Python 中与其他语言同样简单。
16+
17+
Python 允许你将程序分割为不同的模块,以便在其他的 Python 程序中重用。 Python 内置提供了大量的标准模块,你可以将其用作程序的基础,或者作为学习 Python 编程的示例。 这些模块提供了诸如文件 I/O、系统调用、sockets 支持,甚至类似 Tk 的用户图形界面(GUI)工具包接口。
18+
19+
Python 是一门解释型语言,因为无需编译和链接,你可以在程序开发中节省宝贵的时间。 Python 解释器可以交互的使用,这使得试验语言的特性、编写临时程序或在自底向上的程序开发中测试方法非常容易。 你甚至还可以把它当做一个桌面计算器。
20+
21+
Python 让程序编写的紧凑和可读。 用 Python 编写的程序通常比同样的 C、C++或Java 程序更短小,这是因为以下几个原因:
22+
23+
* 高级数据结构使你可以在一条语句中表达复杂的操作;
24+
25+
* 语句组使用缩进代替开始和结束大括号来组织;
26+
27+
* 变量或参数无需声明。
28+
29+
Python 是 *可扩展* 的:如果你会 C 语言编程便可以轻易的为解释器添加内置函数或模块,或者为了对性能瓶颈作优化,或者将 Python 程序与只有二进制形式的库(比如某个专业的商业图形库)连接起来。 一旦你真正掌握了它,你可以将 Python 解释器集成进某个 C 应用程序,并把它当做那个程序的扩展或命令行语言。
30+
31+
顺便说一句,这个语言的名字来自于BBC的 “Monty Python’s Flying Cirecus” 节目,和爬行类动物没有任何关系。 在文档中引用 Monty Python 的典故不仅可行,而且值得鼓励!
32+
33+
现在你已经为 Python 兴奋不已了吧,大概想要领略一些更多的细节! 学习一门语言最好的方法就是使用它,本指南推荐你边读边使用 Python 解释器练习。
34+
35+
下一节中,我们将解释 Python 解释器的用法。 这是很简单的一件事情,但它有助于试验后面的例子。
36+
37+
本手册剩下的部分将通过示例介绍 Python 语言及系统的诸多特性,开始是简单的语法、数据类型和表达式,接着介绍函数与模块,最后涉及异常和自定义类这样的高级内容。

build/doctrees/appetite.doctree

-13.5 KB
Binary file not shown.

build/doctrees/classes.doctree

-148 KB
Binary file not shown.

build/doctrees/controlflow.doctree

-112 KB
Binary file not shown.

build/doctrees/datastructures.doctree

-101 KB
Binary file not shown.

build/doctrees/environment.pickle

-64.4 KB
Binary file not shown.

build/doctrees/errors.doctree

-68.4 KB
Binary file not shown.

build/doctrees/floatingpoint.doctree

-26.7 KB
Binary file not shown.

build/doctrees/index.doctree

-13.6 KB
Binary file not shown.

build/doctrees/inputoutput.doctree

-76.6 KB
Binary file not shown.

build/doctrees/interactive.doctree

-30.1 KB
Binary file not shown.

build/doctrees/interpreter.doctree

-56.7 KB
Binary file not shown.

build/doctrees/introduction.doctree

-75.5 KB
Binary file not shown.

build/doctrees/modules.doctree

-112 KB
Binary file not shown.

build/doctrees/stdlib.doctree

-52.7 KB
Binary file not shown.

build/doctrees/stdlib2.doctree

-58.3 KB
Binary file not shown.

build/doctrees/whatnow.doctree

-16 KB
Binary file not shown.

build/html/.buildinfo

Lines changed: 0 additions & 4 deletions
This file was deleted.

build/html/_sources/appetite.txt

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)