@@ -317,10 +317,12 @@ msgid ""
317317" such errors, but production code should do so. Also, this method will only"
318318" work if the archive fits in memory::"
319319msgstr ""
320+ "若要原地更新打包文件,可用 :class:`BytesIO` "
321+ "对象在内存中进行替换,然后再覆盖源文件。注意,原地覆盖文件会有风险,出错时会丢失原文件。这里没有考虑出错情况,但生产代码则应进行处理。另外,这种方案仅当内存足以容纳打包文件时才有意义:"
320322
321323#: ../../library/zipapp.rst:236
322324msgid "Specifying the Interpreter"
323- msgstr ""
325+ msgstr "指定解释器程序 "
324326
325327#: ../../library/zipapp.rst:238
326328msgid ""
@@ -329,6 +331,8 @@ msgid ""
329331"Python launcher for Windows supports most common forms of POSIX ``#!`` line,"
330332" but there are other issues to consider:"
331333msgstr ""
334+ "注意,如果指定了解释器程序再发布应用程序打包文件,需要确保所用到的解释器是可移植的。Windows 的 Python 启动器支持大多数常见的 POSIX"
335+ " ``#!`` 行,但还需要考虑一些其他问题。"
332336
333337#: ../../library/zipapp.rst:243
334338msgid ""
@@ -337,30 +341,39 @@ msgid ""
337341"may have either Python 2 or Python 3 as their default, and write your code "
338342"to work under both versions."
339343msgstr ""
344+ "如果采用“/usr/bin/env python”(或其他格式的 python "
345+ "调用命令,比如“/usr/bin/python”),需要考虑默认版本既可能是 Python 2 又可能是 Python "
346+ "3,应让代码在两个版本下均能正常运行。"
340347
341348#: ../../library/zipapp.rst:247
342349msgid ""
343350"If you use an explicit version, for example \" /usr/bin/env python3\" your "
344351"application will not work for users who do not have that version. (This may"
345352" be what you want if you have not made your code Python 2 compatible)."
346353msgstr ""
354+ "如果用到的 Python 版本明确,如“/usr/bin/env python3”,则没有该版本的用户将无法运行应用程序。(如果代码不兼容 Python"
355+ " 2,可能正该如此)。"
347356
348357#: ../../library/zipapp.rst:250
349358msgid ""
350359"There is no way to say \" python X.Y or later\" , so be careful of using an "
351360"exact version like \" /usr/bin/env python3.4\" as you will need to change "
352361"your shebang line for users of Python 3.5, for example."
353362msgstr ""
363+ "因为无法指定“python X.Y以上版本”,所以应小心“/usr/bin/env python3.4”这种精确版本的指定方式,因为对于 Python "
364+ "3.5 的用户就得修改释伴行,比如:"
354365
355366#: ../../library/zipapp.rst:254
356367msgid ""
357368"Typically, you should use an \" /usr/bin/env python2\" or \" /usr/bin/env "
358369"python3\" , depending on whether your code is written for Python 2 or 3."
359370msgstr ""
371+ "通常应该用“/usr/bin/env python2”或“/usr/bin/env python3”的格式,具体根据代码适用于 Python 2 还是 "
372+ "3 而定。"
360373
361374#: ../../library/zipapp.rst:259
362375msgid "Creating Standalone Applications with zipapp"
363- msgstr ""
376+ msgstr "用 zipapp 创建独立运行的应用程序 "
364377
365378#: ../../library/zipapp.rst:261
366379msgid ""
0 commit comments