@@ -1253,12 +1253,16 @@ msgid ""
12531253"distribution formats such as Debian packages and Solaris :file:`.pkg` files "
12541254"are in various stages of development."
12551255msgstr ""
1256+ "Distutils 还可以负责创建源代码和二进制分发包。运行 ``python setup.py sdist`` 的 \" sdist\" "
1257+ "命令构建一个源代码分发包,如 :file:`foo-1.0.tar.gz`。添加新命令并不困难,已经有 \" bdist_rpm\" 和 "
1258+ "\" bdist_wininst\" 命令,分别用于创建软件的 RPM 分发包和 Windows 安装程序。创建其他分发格式的命令,如 Debian 包和"
1259+ " Solaris :file:`.pkg` 文件,也在开发的不同阶段。"
12561260
12571261#: ../../whatsnew/2.0.rst:873
12581262msgid ""
12591263"All this is documented in a new manual, *Distributing Python Modules*, that "
12601264"joins the basic set of Python documentation."
1261- msgstr ""
1265+ msgstr "所有这些都记录在一个新手册中,*Distributing Python Modules*,它加入了Python文档的基本集合中。 "
12621266
12631267#: ../../whatsnew/2.0.rst:880
12641268msgid "XML Modules"
@@ -1281,7 +1285,7 @@ msgstr ""
12811285
12821286#: ../../whatsnew/2.0.rst:896
12831287msgid "SAX2 Support"
1284- msgstr ""
1288+ msgstr "SAX2 支持 "
12851289
12861290#: ../../whatsnew/2.0.rst:898
12871291msgid ""
@@ -1302,13 +1306,15 @@ msgid ""
13021306"class can get very complicated if you're trying to modify the document "
13031307"structure in some elaborate way."
13041308msgstr ""
1309+ "事件驱动方法的优点是整个文档不必同时驻留在内存中,这在处理非常大的文档时尤其重要。然而,如果你试图以某种复杂的方式修改文档结构,编写 SAX "
1310+ "处理程序类可能会变得非常复杂。"
13051311
13061312#: ../../whatsnew/2.0.rst:912
13071313msgid ""
13081314"For example, this little example program defines a handler that prints a "
13091315"message for every starting and ending tag, and then parses the file "
13101316":file:`hamlet.xml` using it::"
1311- msgstr ""
1317+ msgstr "例如,这个小示例程序定义了一个处理器,它为每个开始和结束标签打印一条消息,然后使用它来解析文件 :file:`hamlet.xml`:: "
13121318
13131319#: ../../whatsnew/2.0.rst:935
13141320msgid ""
@@ -1341,6 +1347,8 @@ msgid ""
13411347"producing XML output than simply writing ``<tag1>``...\\ ``</tag1>`` to a "
13421348"file."
13431349msgstr ""
1350+ "DOM 在修改 XML 文档方面非常有用,因为你可以创建一个 DOM 树,通过添加新节点或重新排列子树来修改它,然后生成一个新的 XML "
1351+ "文档作为输出。你还可以手动构建一个 DOM 树并将其转换为 XML,这比简单地将``<tag1>``...\\ ``</tag1>``写入文件更灵活。"
13441352
13451353#: ../../whatsnew/2.0.rst:956
13461354msgid ""
@@ -1365,14 +1373,15 @@ msgstr ""
13651373
13661374#: ../../whatsnew/2.0.rst:977
13671375msgid "For the *Hamlet* XML file, the above few lines output::"
1368- msgstr ""
1376+ msgstr "对于 *Hamlet* XML 文件,上面几行代码输出:: "
13691377
13701378#: ../../whatsnew/2.0.rst:982
13711379msgid ""
13721380"The root element of the document is available as ``doc.documentElement``, "
13731381"and its children can be easily modified by deleting, adding, or removing "
13741382"nodes::"
13751383msgstr ""
1384+ "文件的根元素可以通过 ``doc.documentElement`` 访问,并且可以通过删除、添加或一处节点来听松修改节点来轻松修改其子元素::"
13761385
13771386#: ../../whatsnew/2.0.rst:997
13781387msgid ""
@@ -1405,6 +1414,10 @@ msgid ""
14051414" a strict superset of the standard package, adding a bunch of additional "
14061415"features. Some of the additional features in PyXML include:"
14071416msgstr ""
1417+ "答案是 Python 2.0 的 :mod:`xml` 包与 PyXML 不兼容,但可以通过安装最新版本的 PyXML 来使其兼容。 "
1418+ "许多应用程序可以依赖 Python 2.0 中包含的 XML 支持,但更复杂的应用程序需要安装完整的 PyXML 包。 安装后,版本为 0.6.0 "
1419+ "或更高的 PyXML 将替换随 Python 一起发布的 :mod:`xml` 包,并且将是标准包的严格超集,添加许多额外的功能。 PyXML "
1420+ "中的一些附加功能包括:"
14081421
14091422#: ../../whatsnew/2.0.rst:1019
14101423msgid "4DOM, a full DOM implementation from FourThought, Inc."
@@ -1470,6 +1483,9 @@ msgid ""
14701483" operating systems that only have BSD curses, but there don't seem to be any"
14711484" currently maintained OSes that fall into this category."
14721485msgstr ""
1486+ ":mod:`curses` 模块在 Oliver Andrich 增强版本的基础上得到了极大的扩展,提供了许多来自 ncurses 和 SYSV "
1487+ "curses 的附加功能,如颜色、替代字符集支持、手写板和鼠标支持等。 这意味着该模块不再兼容仅有 BSD curses "
1488+ "的操作系统,但目前似乎没有任何属于这一类别的操作系统正在维护中。"
14731489
14741490#: ../../whatsnew/2.0.rst:1064
14751491msgid ""
@@ -1479,6 +1495,8 @@ msgid ""
14791495"written by Fredrik Lundh and partially funded by Hewlett Packard, supports "
14801496"matching against both 8-bit strings and Unicode strings."
14811497msgstr ""
1498+ "如前面讨论的 Python 2.0 对 Unicode 的支持所提到的,:mod:`re` 模块提供的正则表达式的底层实现已经更改。 "
1499+ "SRE,一个新的正则表达式引擎,由 Ferdrik Lundh 编写,部分由惠普资助,支持匹配 8 位字符串和 Unicode 字符串。"
14821500
14831501#: ../../whatsnew/2.0.rst:1074
14841502msgid "New modules"
@@ -1489,7 +1507,7 @@ msgid ""
14891507"A number of new modules were added. We'll simply list them with brief "
14901508"descriptions; consult the 2.0 documentation for the details of a particular "
14911509"module."
1492- msgstr ""
1510+ msgstr "添加了许多新模块,我们将简单列出它们并附上简要概述;有关特定模块的详细信息,请查阅 2.0 文档。 "
14931511
14941512#: ../../whatsnew/2.0.rst:1080
14951513msgid ""
@@ -1499,6 +1517,9 @@ msgid ""
14991517":mod:`atexit` and calling :func:`atexit.register` with the function to be "
15001518"called on exit. (Contributed by Skip Montanaro.)"
15011519msgstr ""
1520+ ":mod:`atexit` 模块用于注册在 Python 解释器退出之前调用的函数。当前直接设置 ``sys.exitfunc`` 的代码应改为使用 "
1521+ ":mod:`atexit` 模块,导入 :mod:`atexit` 并使用 :func:`atexit.register` 调用要在退出时调用的函数。 "
1522+ "(由 Skip Montanaro 贡献。)"
15021523
15031524#: ../../whatsnew/2.0.rst:1086
15041525msgid ""
@@ -1521,6 +1542,9 @@ msgid ""
15211542"separate contributions by Martin von Löwis, Peter Funk, and James "
15221543"Henstridge.)"
15231544msgstr ""
1545+ ":mod:`gettext`: 这个模块通过提供 GNU gettext 消息目录库的接口,为 Python "
1546+ "程序提供国际化(I18N)和本地化(L10N)支持。 (由 Barry Warsaw 整合,来自 Martin von Löwis, Peter "
1547+ "Funk 和 James Henstridge 的独立贡献。)"
15241548
15251549#: ../../whatsnew/2.0.rst:1098
15261550msgid ""
@@ -1538,6 +1562,9 @@ msgid ""
15381562"the :mod:`re` module. (Contributed by Sam Rushing, with some extensions by "
15391563"A.M. Kuchling.)"
15401564msgstr ""
1565+ ":mod:`mmap`: 提供对内存映射文件的接口,支持 Windows 和 "
1566+ "Unix。文件的内容可以直接映射到内存中,此时它表现得像一个可变字符串,因此可以读取和修改其内容。它们甚至可以传递给期望普通字符串的函数,例如 "
1567+ ":mod:`re` 模块。(由 Sam Rushing 贡献,并由 A.M. Kuchling 提供一些扩展。)"
15411568
15421569#: ../../whatsnew/2.0.rst:1108
15431570msgid ""
@@ -1558,7 +1585,7 @@ msgstr ""
15581585msgid ""
15591586":mod:`tabnanny`: A module/script to check Python source code for ambiguous "
15601587"indentation. (Contributed by Tim Peters.)"
1561- msgstr ""
1588+ msgstr ":mod:`tabnanny`: 一个模块/脚本,用于检查 Python 源代码中不歧义的缩进。 (由 Tim Peters 贡献。) "
15621589
15631590#: ../../whatsnew/2.0.rst:1120
15641591msgid ""
@@ -1577,6 +1604,10 @@ msgid ""
15771604":file:`Tools/idle/BrowserControl.py`, and adapted for the standard library "
15781605"by Fred.)"
15791606msgstr ""
1607+ ":mod:`webbrowser` 模块提供了一种平台独立的方式来在特定 URL 上启动 web "
1608+ "浏览器。对于每个平台,模块会按特定顺序尝试各种浏览器。用户可以通过设置 *BROWSER* 环境变量来更改启动的浏览器。(最初的灵感来自 Eric S."
1609+ " Raymond 对 :mod:`urllib` 的补丁,该补丁增加了类似的功能,但最终的模块来自 Fred Drake 最初实现的代码 "
1610+ ":file:`Tools/idle/BrowserControl.py`,并由 Fred 适配到标准库中。)"
15801611
15811612#: ../../whatsnew/2.0.rst:1132
15821613msgid ""
@@ -1593,6 +1624,9 @@ msgid ""
15931624"on Unix, not to be confused with :program:`gzip`\\ -format files (which are "
15941625"supported by the :mod:`gzip` module) (Contributed by James C. Ahlstrom.)"
15951626msgstr ""
1627+ ":mod:`zipfile` 模块:用于读取和写入 ZIP 格式的归档文件。 这些归档文件是由 DOS/Windows 上的 "
1628+ ":program:`PKZIP` 或 Unix 上的 :program:`zip` 生成的,不要与 :program:`gzip` 格式文件(由 "
1629+ ":mod:`gzip` 支持)混淆。 (由 James C. Ahlstrom 贡献。)"
15961630
15971631#: ../../whatsnew/2.0.rst:1142
15981632msgid ""
@@ -1631,13 +1665,13 @@ msgstr "类浏览器现在将显示更多信息,例如一个模块中最高层
16311665msgid ""
16321666"Tab width is now a user settable option. When opening an existing Python "
16331667"file, IDLE automatically detects the indentation conventions, and adapts."
1634- msgstr ""
1668+ msgstr "制表符宽度现在是一个用户可设置的选项。在打开现有的 Python 文件时,IDLE 会自动检测缩进约定并进行适应。 "
16351669
16361670#: ../../whatsnew/2.0.rst:1165
16371671msgid ""
16381672"There is now support for calling browsers on various platforms, used to open"
16391673" the Python documentation in a browser."
1640- msgstr ""
1674+ msgstr "现在支持在各种平台上调用浏览器,用于在浏览器中打开 Python 文档。 "
16411675
16421676#: ../../whatsnew/2.0.rst:1168
16431677msgid ""
@@ -1662,6 +1696,7 @@ msgid ""
16621696"Three new keystroke commands: Check module (:kbd:`Alt-F5`), Import module "
16631697"(:kbd:`F5`) and Run script (:kbd:`Ctrl-F5`)."
16641698msgstr ""
1699+ "三个新的键盘快捷键:检查模块 (:kbd:`Alt-F5`),导入模块 (:kbd:`F5`) 和执行脚本 (:kbd:`Ctrl-F5`)。"
16651700
16661701#: ../../whatsnew/2.0.rst:1184
16671702msgid "Deleted and Deprecated Modules"
0 commit comments