@@ -342,30 +342,39 @@ msgid ""
342342"may have either Python 2 or Python 3 as their default, and write your code "
343343"to work under both versions."
344344msgstr ""
345+ "如果采用“/usr/bin/env python”(或其他格式的 python "
346+ "调用命令,比如“/usr/bin/python”),需要考虑默认版本既可能是 Python 2 又可能是 Python "
347+ "3,应让代码在两个版本下均能正常运行。"
345348
346349#: ../../library/zipapp.rst:247
347350msgid ""
348351"If you use an explicit version, for example \" /usr/bin/env python3\" your "
349352"application will not work for users who do not have that version. (This may"
350353" be what you want if you have not made your code Python 2 compatible)."
351354msgstr ""
355+ "如果用到的 Python 版本明确,如“/usr/bin/env python3”,则没有该版本的用户将无法运行应用程序。(如果代码不兼容 Python"
356+ " 2,可能正该如此)。"
352357
353358#: ../../library/zipapp.rst:250
354359msgid ""
355360"There is no way to say \" python X.Y or later\" , so be careful of using an "
356361"exact version like \" /usr/bin/env python3.4\" as you will need to change "
357362"your shebang line for users of Python 3.5, for example."
358363msgstr ""
364+ "因为无法指定“python X.Y以上版本”,所以应小心“/usr/bin/env python3.4”这种精确版本的指定方式,因为对于 Python "
365+ "3.5 的用户就得修改释伴行,比如:"
359366
360367#: ../../library/zipapp.rst:254
361368msgid ""
362369"Typically, you should use an \" /usr/bin/env python2\" or \" /usr/bin/env "
363370"python3\" , depending on whether your code is written for Python 2 or 3."
364371msgstr ""
372+ "通常应该用“/usr/bin/env python2”或“/usr/bin/env python3”的格式,具体根据代码适用于 Python 2 还是 "
373+ "3 而定。"
365374
366375#: ../../library/zipapp.rst:259
367376msgid "Creating Standalone Applications with zipapp"
368- msgstr ""
377+ msgstr "用 zipapp 创建独立运行的应用程序 "
369378
370379#: ../../library/zipapp.rst:261
371380msgid ""
@@ -375,23 +384,25 @@ msgid ""
375384"this is to bundle all of the application's dependencies into the archive, "
376385"along with the application code."
377386msgstr ""
387+ "利用 :mod:`zipapp` 模块可以创建独立运行的 Python 程序,以便向最终用户发布,仅需在系统中装有合适版本的 Python "
388+ "即可运行。操作的关键就是把应用程序代码和所有依赖项一起放入打包文件中。"
378389
379390#: ../../library/zipapp.rst:267
380391msgid "The steps to create a standalone archive are as follows:"
381- msgstr ""
392+ msgstr "创建独立运行打包文件的步骤如下: "
382393
383394#: ../../library/zipapp.rst:269
384395msgid ""
385396"Create your application in a directory as normal, so you have a ``myapp`` "
386397"directory containing a ``__main__.py`` file, and any supporting application "
387398"code."
388- msgstr ""
399+ msgstr "照常在某个目录中创建应用程序,于是会有一个 ``myapp`` 目录,里面有个``__main__.py`` 文件,以及所有支持性代码。 "
389400
390401#: ../../library/zipapp.rst:273
391402msgid ""
392403"Install all of your application's dependencies into the ``myapp`` directory,"
393404" using pip:"
394- msgstr ""
405+ msgstr "用 pip 将应用程序的所有依赖项装入 ``myapp`` 目录。 "
395406
396407#: ../../library/zipapp.rst:280
397408msgid ""
0 commit comments