@@ -1253,12 +1253,16 @@ msgid ""
1253
1253
"distribution formats such as Debian packages and Solaris :file:`.pkg` files "
1254
1254
"are in various stages of development."
1255
1255
msgstr ""
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` 文件,也在开发的不同阶段。"
1256
1260
1257
1261
#: ../../whatsnew/2.0.rst:873
1258
1262
msgid ""
1259
1263
"All this is documented in a new manual, *Distributing Python Modules*, that "
1260
1264
"joins the basic set of Python documentation."
1261
- msgstr ""
1265
+ msgstr "所有这些都记录在一个新手册中,*Distributing Python Modules*,它加入了Python文档的基本集合中。 "
1262
1266
1263
1267
#: ../../whatsnew/2.0.rst:880
1264
1268
msgid "XML Modules"
@@ -1281,7 +1285,7 @@ msgstr ""
1281
1285
1282
1286
#: ../../whatsnew/2.0.rst:896
1283
1287
msgid "SAX2 Support"
1284
- msgstr ""
1288
+ msgstr "SAX2 支持 "
1285
1289
1286
1290
#: ../../whatsnew/2.0.rst:898
1287
1291
msgid ""
@@ -1302,13 +1306,15 @@ msgid ""
1302
1306
"class can get very complicated if you're trying to modify the document "
1303
1307
"structure in some elaborate way."
1304
1308
msgstr ""
1309
+ "事件驱动方法的优点是整个文档不必同时驻留在内存中,这在处理非常大的文档时尤其重要。然而,如果你试图以某种复杂的方式修改文档结构,编写 SAX "
1310
+ "处理程序类可能会变得非常复杂。"
1305
1311
1306
1312
#: ../../whatsnew/2.0.rst:912
1307
1313
msgid ""
1308
1314
"For example, this little example program defines a handler that prints a "
1309
1315
"message for every starting and ending tag, and then parses the file "
1310
1316
":file:`hamlet.xml` using it::"
1311
- msgstr ""
1317
+ msgstr "例如,这个小示例程序定义了一个处理器,它为每个开始和结束标签打印一条消息,然后使用它来解析文件 :file:`hamlet.xml`:: "
1312
1318
1313
1319
#: ../../whatsnew/2.0.rst:935
1314
1320
msgid ""
@@ -1341,6 +1347,8 @@ msgid ""
1341
1347
"producing XML output than simply writing ``<tag1>``...\\ ``</tag1>`` to a "
1342
1348
"file."
1343
1349
msgstr ""
1350
+ "DOM 在修改 XML 文档方面非常有用,因为你可以创建一个 DOM 树,通过添加新节点或重新排列子树来修改它,然后生成一个新的 XML "
1351
+ "文档作为输出。你还可以手动构建一个 DOM 树并将其转换为 XML,这比简单地将``<tag1>``...\\ ``</tag1>``写入文件更灵活。"
1344
1352
1345
1353
#: ../../whatsnew/2.0.rst:956
1346
1354
msgid ""
@@ -1365,14 +1373,15 @@ msgstr ""
1365
1373
1366
1374
#: ../../whatsnew/2.0.rst:977
1367
1375
msgid "For the *Hamlet* XML file, the above few lines output::"
1368
- msgstr ""
1376
+ msgstr "对于 *Hamlet* XML 文件,上面几行代码输出:: "
1369
1377
1370
1378
#: ../../whatsnew/2.0.rst:982
1371
1379
msgid ""
1372
1380
"The root element of the document is available as ``doc.documentElement``, "
1373
1381
"and its children can be easily modified by deleting, adding, or removing "
1374
1382
"nodes::"
1375
1383
msgstr ""
1384
+ "文件的根元素可以通过 ``doc.documentElement`` 访问,并且可以通过删除、添加或一处节点来听松修改节点来轻松修改其子元素::"
1376
1385
1377
1386
#: ../../whatsnew/2.0.rst:997
1378
1387
msgid ""
@@ -1405,6 +1414,10 @@ msgid ""
1405
1414
" a strict superset of the standard package, adding a bunch of additional "
1406
1415
"features. Some of the additional features in PyXML include:"
1407
1416
msgstr ""
1417
+ "答案是 Python 2.0 的 :mod:`xml` 包与 PyXML 不兼容,但可以通过安装最新版本的 PyXML 来使其兼容。 "
1418
+ "许多应用程序可以依赖 Python 2.0 中包含的 XML 支持,但更复杂的应用程序需要安装完整的 PyXML 包。 安装后,版本为 0.6.0 "
1419
+ "或更高的 PyXML 将替换随 Python 一起发布的 :mod:`xml` 包,并且将是标准包的严格超集,添加许多额外的功能。 PyXML "
1420
+ "中的一些附加功能包括:"
1408
1421
1409
1422
#: ../../whatsnew/2.0.rst:1019
1410
1423
msgid "4DOM, a full DOM implementation from FourThought, Inc."
@@ -1470,6 +1483,9 @@ msgid ""
1470
1483
" operating systems that only have BSD curses, but there don't seem to be any"
1471
1484
" currently maintained OSes that fall into this category."
1472
1485
msgstr ""
1486
+ ":mod:`curses` 模块在 Oliver Andrich 增强版本的基础上得到了极大的扩展,提供了许多来自 ncurses 和 SYSV "
1487
+ "curses 的附加功能,如颜色、替代字符集支持、手写板和鼠标支持等。 这意味着该模块不再兼容仅有 BSD curses "
1488
+ "的操作系统,但目前似乎没有任何属于这一类别的操作系统正在维护中。"
1473
1489
1474
1490
#: ../../whatsnew/2.0.rst:1064
1475
1491
msgid ""
@@ -1479,6 +1495,8 @@ msgid ""
1479
1495
"written by Fredrik Lundh and partially funded by Hewlett Packard, supports "
1480
1496
"matching against both 8-bit strings and Unicode strings."
1481
1497
msgstr ""
1498
+ "如前面讨论的 Python 2.0 对 Unicode 的支持所提到的,:mod:`re` 模块提供的正则表达式的底层实现已经更改。 "
1499
+ "SRE,一个新的正则表达式引擎,由 Ferdrik Lundh 编写,部分由惠普资助,支持匹配 8 位字符串和 Unicode 字符串。"
1482
1500
1483
1501
#: ../../whatsnew/2.0.rst:1074
1484
1502
msgid "New modules"
@@ -1489,7 +1507,7 @@ msgid ""
1489
1507
"A number of new modules were added. We'll simply list them with brief "
1490
1508
"descriptions; consult the 2.0 documentation for the details of a particular "
1491
1509
"module."
1492
- msgstr ""
1510
+ msgstr "添加了许多新模块,我们将简单列出它们并附上简要概述;有关特定模块的详细信息,请查阅 2.0 文档。 "
1493
1511
1494
1512
#: ../../whatsnew/2.0.rst:1080
1495
1513
msgid ""
@@ -1499,6 +1517,9 @@ msgid ""
1499
1517
":mod:`atexit` and calling :func:`atexit.register` with the function to be "
1500
1518
"called on exit. (Contributed by Skip Montanaro.)"
1501
1519
msgstr ""
1520
+ ":mod:`atexit` 模块用于注册在 Python 解释器退出之前调用的函数。当前直接设置 ``sys.exitfunc`` 的代码应改为使用 "
1521
+ ":mod:`atexit` 模块,导入 :mod:`atexit` 并使用 :func:`atexit.register` 调用要在退出时调用的函数。 "
1522
+ "(由 Skip Montanaro 贡献。)"
1502
1523
1503
1524
#: ../../whatsnew/2.0.rst:1086
1504
1525
msgid ""
@@ -1521,6 +1542,9 @@ msgid ""
1521
1542
"separate contributions by Martin von Löwis, Peter Funk, and James "
1522
1543
"Henstridge.)"
1523
1544
msgstr ""
1545
+ ":mod:`gettext`: 这个模块通过提供 GNU gettext 消息目录库的接口,为 Python "
1546
+ "程序提供国际化(I18N)和本地化(L10N)支持。 (由 Barry Warsaw 整合,来自 Martin von Löwis, Peter "
1547
+ "Funk 和 James Henstridge 的独立贡献。)"
1524
1548
1525
1549
#: ../../whatsnew/2.0.rst:1098
1526
1550
msgid ""
@@ -1538,6 +1562,9 @@ msgid ""
1538
1562
"the :mod:`re` module. (Contributed by Sam Rushing, with some extensions by "
1539
1563
"A.M. Kuchling.)"
1540
1564
msgstr ""
1565
+ ":mod:`mmap`: 提供对内存映射文件的接口,支持 Windows 和 "
1566
+ "Unix。文件的内容可以直接映射到内存中,此时它表现得像一个可变字符串,因此可以读取和修改其内容。它们甚至可以传递给期望普通字符串的函数,例如 "
1567
+ ":mod:`re` 模块。(由 Sam Rushing 贡献,并由 A.M. Kuchling 提供一些扩展。)"
1541
1568
1542
1569
#: ../../whatsnew/2.0.rst:1108
1543
1570
msgid ""
@@ -1558,7 +1585,7 @@ msgstr ""
1558
1585
msgid ""
1559
1586
":mod:`tabnanny`: A module/script to check Python source code for ambiguous "
1560
1587
"indentation. (Contributed by Tim Peters.)"
1561
- msgstr ""
1588
+ msgstr ":mod:`tabnanny`: 一个模块/脚本,用于检查 Python 源代码中不歧义的缩进。 (由 Tim Peters 贡献。) "
1562
1589
1563
1590
#: ../../whatsnew/2.0.rst:1120
1564
1591
msgid ""
@@ -1577,6 +1604,10 @@ msgid ""
1577
1604
":file:`Tools/idle/BrowserControl.py`, and adapted for the standard library "
1578
1605
"by Fred.)"
1579
1606
msgstr ""
1607
+ ":mod:`webbrowser` 模块提供了一种平台独立的方式来在特定 URL 上启动 web "
1608
+ "浏览器。对于每个平台,模块会按特定顺序尝试各种浏览器。用户可以通过设置 *BROWSER* 环境变量来更改启动的浏览器。(最初的灵感来自 Eric S."
1609
+ " Raymond 对 :mod:`urllib` 的补丁,该补丁增加了类似的功能,但最终的模块来自 Fred Drake 最初实现的代码 "
1610
+ ":file:`Tools/idle/BrowserControl.py`,并由 Fred 适配到标准库中。)"
1580
1611
1581
1612
#: ../../whatsnew/2.0.rst:1132
1582
1613
msgid ""
@@ -1593,6 +1624,9 @@ msgid ""
1593
1624
"on Unix, not to be confused with :program:`gzip`\\ -format files (which are "
1594
1625
"supported by the :mod:`gzip` module) (Contributed by James C. Ahlstrom.)"
1595
1626
msgstr ""
1627
+ ":mod:`zipfile` 模块:用于读取和写入 ZIP 格式的归档文件。 这些归档文件是由 DOS/Windows 上的 "
1628
+ ":program:`PKZIP` 或 Unix 上的 :program:`zip` 生成的,不要与 :program:`gzip` 格式文件(由 "
1629
+ ":mod:`gzip` 支持)混淆。 (由 James C. Ahlstrom 贡献。)"
1596
1630
1597
1631
#: ../../whatsnew/2.0.rst:1142
1598
1632
msgid ""
@@ -1631,13 +1665,13 @@ msgstr "类浏览器现在将显示更多信息,例如一个模块中最高层
1631
1665
msgid ""
1632
1666
"Tab width is now a user settable option. When opening an existing Python "
1633
1667
"file, IDLE automatically detects the indentation conventions, and adapts."
1634
- msgstr ""
1668
+ msgstr "制表符宽度现在是一个用户可设置的选项。在打开现有的 Python 文件时,IDLE 会自动检测缩进约定并进行适应。 "
1635
1669
1636
1670
#: ../../whatsnew/2.0.rst:1165
1637
1671
msgid ""
1638
1672
"There is now support for calling browsers on various platforms, used to open"
1639
1673
" the Python documentation in a browser."
1640
- msgstr ""
1674
+ msgstr "现在支持在各种平台上调用浏览器,用于在浏览器中打开 Python 文档。 "
1641
1675
1642
1676
#: ../../whatsnew/2.0.rst:1168
1643
1677
msgid ""
@@ -1662,6 +1696,7 @@ msgid ""
1662
1696
"Three new keystroke commands: Check module (:kbd:`Alt-F5`), Import module "
1663
1697
"(:kbd:`F5`) and Run script (:kbd:`Ctrl-F5`)."
1664
1698
msgstr ""
1699
+ "三个新的键盘快捷键:检查模块 (:kbd:`Alt-F5`),导入模块 (:kbd:`F5`) 和执行脚本 (:kbd:`Ctrl-F5`)。"
1665
1700
1666
1701
#: ../../whatsnew/2.0.rst:1184
1667
1702
msgid "Deleted and Deprecated Modules"
0 commit comments