@@ -1142,18 +1142,21 @@ msgstr "``PATH`` 环境变量用于获取程序的完整路径 (来自 :c:member
11421142
11431143#: ../../c-api/init_config.rst:906
11441144msgid "``__PYVENV_LAUNCHER__`` environment variable"
1145- msgstr ""
1145+ msgstr "``__PYVENV_LAUNCHER__`` 环境变量 "
11461146
11471147#: ../../c-api/init_config.rst:907
11481148msgid ""
11491149"(Windows only) Application paths in the registry under "
11501150"\" Software\\ Python\\ PythonCore\\ X.Y\\ PythonPath\" of HKEY_CURRENT_USER and "
11511151"HKEY_LOCAL_MACHINE (where X.Y is the Python version)."
11521152msgstr ""
1153+ "(仅限 Windows only) 注册表 HKEY_CURRENT_USER 和 HKEY_LOCAL_MACHINE 的 "
1154+ "\" Software\\ Python\\ PythonCore\\ X.Y\\ PythonPath\" 项下的应用程序目录(其中 X.Y 为 Python "
1155+ "版本)。"
11531156
11541157#: ../../c-api/init_config.rst:911
11551158msgid "Path configuration output fields:"
1156- msgstr ""
1159+ msgstr "路径配置输出字段: "
11571160
11581161#: ../../c-api/init_config.rst:913
11591162msgid ":c:member:`PyConfig.base_exec_prefix`"
@@ -1220,37 +1223,45 @@ msgid ""
12201223"their value from :c:member:`~PyConfig.prefix` and "
12211224":c:member:`~PyConfig.exec_prefix` respectively."
12221225msgstr ""
1226+ "如果 :c:member:`~PyConfig.base_prefix` 或 "
1227+ ":c:member:`~PyConfig.base_exec_prefix` 字段未设置,它们将分别从 "
1228+ ":c:member:`~PyConfig.prefix` 和 :c:member:`~PyConfig.exec_prefix` 继承其值。"
12231229
12241230#: ../../c-api/init_config.rst:942
12251231msgid ":c:func:`Py_RunMain` and :c:func:`Py_Main` modify :data:`sys.path`:"
1226- msgstr ""
1232+ msgstr ":c:func:`Py_RunMain` 和 :c:func:`Py_Main` 将修改 :data:`sys.path`: "
12271233
12281234#: ../../c-api/init_config.rst:944
12291235msgid ""
12301236"If :c:member:`~PyConfig.run_filename` is set and is a directory which "
12311237"contains a ``__main__.py`` script, prepend "
12321238":c:member:`~PyConfig.run_filename` to :data:`sys.path`."
12331239msgstr ""
1240+ "如果 :c:member:`~PyConfig.run_filename` 已设置并且是一个包含 ``__main__.py`` 脚本的目录,则会将 "
1241+ ":c:member:`~PyConfig.run_filename` 添加到 :data:`sys.path` 的开头。"
12341242
12351243#: ../../c-api/init_config.rst:947
12361244msgid "If :c:member:`~PyConfig.isolated` is zero:"
1237- msgstr ""
1245+ msgstr "如果 :c:member:`~PyConfig.isolated` 为零: "
12381246
12391247#: ../../c-api/init_config.rst:949
12401248msgid ""
12411249"If :c:member:`~PyConfig.run_module` is set, prepend the current directory to"
12421250" :data:`sys.path`. Do nothing if the current directory cannot be read."
12431251msgstr ""
1252+ "如果设置了 :c:member:`~PyConfig.run_module`,则将当前目录添加到 :data:`sys.path` 的开头。 "
1253+ "如果无法读取当前目录则不执行任何操作。"
12441254
12451255#: ../../c-api/init_config.rst:951
12461256msgid ""
12471257"If :c:member:`~PyConfig.run_filename` is set, prepend the directory of the "
12481258"filename to :data:`sys.path`."
12491259msgstr ""
1260+ "如果设置了 :c:member:`~PyConfig.run_filename`,则将文件名的目录添加到 :data:`sys.path` 的开头。"
12501261
12511262#: ../../c-api/init_config.rst:953
12521263msgid "Otherwise, prepend an empty string to :data:`sys.path`."
1253- msgstr ""
1264+ msgstr "在其他情况下,则将一个空字符串添加到 :data:`sys.path` 的开头。 "
12541265
12551266#: ../../c-api/init_config.rst:955
12561267msgid ""
@@ -1260,10 +1271,13 @@ msgid ""
12601271"package directory exists, the :mod:`site` module appends the user's site-"
12611272"package directory to :data:`sys.path`."
12621273msgstr ""
1274+ "如果 :c:member:`~PyConfig.site_import` 为非零值,则 :data:`sys.path` 可通过 :mod:`site`"
1275+ " 模块修改。 如果 :c:member:`~PyConfig.user_site_directory` 为非零值且用户的 site-package "
1276+ "目录存在,则 :mod:`site` 模块会将用户的 site-package 目录附加到 :data:`sys.path`。"
12631277
12641278#: ../../c-api/init_config.rst:961
12651279msgid "The following configuration files are used by the path configuration:"
1266- msgstr ""
1280+ msgstr "路径配置会使用以下配置文件: "
12671281
12681282#: ../../c-api/init_config.rst:963
12691283msgid "``pyvenv.cfg``"
@@ -1282,10 +1296,11 @@ msgid ""
12821296"The ``__PYVENV_LAUNCHER__`` environment variable is used to set "
12831297":c:member:`PyConfig.base_executable`"
12841298msgstr ""
1299+ "``__PYVENV_LAUNCHER__`` 环境变量将被用于设置 :c:member:`PyConfig.base_executable`"
12851300
12861301#: ../../c-api/init_config.rst:972
12871302msgid "Py_RunMain()"
1288- msgstr ""
1303+ msgstr "Py_RunMain() "
12891304
12901305#: ../../c-api/init_config.rst:976
12911306msgid ""
@@ -1294,94 +1309,98 @@ msgid ""
12941309"(:c:member:`PyConfig.run_module`) specified on the command line or in the "
12951310"configuration."
12961311msgstr ""
1312+ "执行在命令行或配置中指定的命令 (:c:member:`PyConfig.run_command`)、脚本 "
1313+ "(:c:member:`PyConfig.run_filename`) 或模块 (:c:member:`PyConfig.run_module`)。"
12971314
12981315#: ../../c-api/init_config.rst:981
12991316msgid "By default and when if :option:`-i` option is used, run the REPL."
1300- msgstr ""
1317+ msgstr "在默认情况下如果使用了 :option:`-i` 选项,则运行 REPL。 "
13011318
13021319#: ../../c-api/init_config.rst:983
13031320msgid ""
13041321"Finally, finalizes Python and returns an exit status that can be passed to "
13051322"the ``exit()`` function."
1306- msgstr ""
1323+ msgstr "最后,终结化 Python 并返回一个可传递给 ``exit()`` 函数的退出状态。 "
13071324
13081325#: ../../c-api/init_config.rst:986
13091326msgid ""
13101327"See :ref:`Python Configuration <init-python-config>` for an example of "
13111328"customized Python always running in isolated mode using "
13121329":c:func:`Py_RunMain`."
13131330msgstr ""
1331+ "请参阅 :ref:`Python 配置 <init-python-config>` 查看一个使用 :c:func:`Py_RunMain` "
1332+ "在隔离模式下始终运行自定义 Python 的示例。"
13141333
13151334#: ../../c-api/init_config.rst:992
13161335msgid "Py_GetArgcArgv()"
1317- msgstr ""
1336+ msgstr "Py_GetArgcArgv() "
13181337
13191338#: ../../c-api/init_config.rst:996
13201339msgid "Get the original command line arguments, before Python modified them."
1321- msgstr ""
1340+ msgstr "在 Python 修改原始命令行参数之前,获取这些参数。 "
13221341
13231342#: ../../c-api/init_config.rst:1000
13241343msgid "Multi-Phase Initialization Private Provisional API"
1325- msgstr ""
1344+ msgstr "多阶段初始化私有暂定 API "
13261345
13271346#: ../../c-api/init_config.rst:1002
13281347msgid ""
13291348"This section is a private provisional API introducing multi-phase "
13301349"initialization, the core feature of :pep:`432`:"
1331- msgstr ""
1350+ msgstr "本节介绍的私有暂定 API 引入了多阶段初始化,它是 :pep:`432` 的核心特性: "
13321351
13331352#: ../../c-api/init_config.rst:1005
13341353msgid "\" Core\" initialization phase, \" bare minimum Python\" :"
1335- msgstr ""
1354+ msgstr "“核心”初始化阶段,“最小化的基本 Python”: "
13361355
13371356#: ../../c-api/init_config.rst:1007
13381357msgid "Builtin types;"
1339- msgstr ""
1358+ msgstr "内置类型; "
13401359
13411360#: ../../c-api/init_config.rst:1008
13421361msgid "Builtin exceptions;"
1343- msgstr ""
1362+ msgstr "内置异常; "
13441363
13451364#: ../../c-api/init_config.rst:1009
13461365msgid "Builtin and frozen modules;"
1347- msgstr ""
1366+ msgstr "内置和已冻结模块; "
13481367
13491368#: ../../c-api/init_config.rst:1010
13501369msgid ""
13511370"The :mod:`sys` module is only partially initialized (ex: :data:`sys.path` "
13521371"doesn't exist yet)."
1353- msgstr ""
1372+ msgstr ":mod:`sys` 模块仅部分初始化(例如: :data:`sys.path` 尚不存在)。 "
13541373
13551374#: ../../c-api/init_config.rst:1013
13561375msgid "\" Main\" initialization phase, Python is fully initialized:"
1357- msgstr ""
1376+ msgstr "\" 主要 \" 初始化阶段,Python 被完全初始化: "
13581377
13591378#: ../../c-api/init_config.rst:1015
13601379msgid "Install and configure :mod:`importlib`;"
1361- msgstr ""
1380+ msgstr "安装并配置 :mod:`importlib`; "
13621381
13631382#: ../../c-api/init_config.rst:1016
13641383msgid "Apply the :ref:`Path Configuration <init-path-config>`;"
1365- msgstr ""
1384+ msgstr "应用 :ref:`路径配置 <init-path-config>`; "
13661385
13671386#: ../../c-api/init_config.rst:1017
13681387msgid "Install signal handlers;"
1369- msgstr ""
1388+ msgstr "安装信号处理句柄; "
13701389
13711390#: ../../c-api/init_config.rst:1018
13721391msgid ""
13731392"Finish :mod:`sys` module initialization (ex: create :data:`sys.stdout` and "
13741393":data:`sys.path`);"
1375- msgstr ""
1394+ msgstr "完成 :mod:`sys` 模块初始化 (例如:创建 :data:`sys.stdout` 和 :data:`sys.path`); "
13761395
13771396#: ../../c-api/init_config.rst:1020
13781397msgid ""
13791398"Enable optional features like :mod:`faulthandler` and :mod:`tracemalloc`;"
1380- msgstr ""
1399+ msgstr "启用 :mod:`faulthandler` 和 :mod:`tracemalloc` 等可选功能; "
13811400
13821401#: ../../c-api/init_config.rst:1021
13831402msgid "Import the :mod:`site` module;"
1384- msgstr ""
1403+ msgstr "导入 :mod:`site` 模块; "
13851404
13861405#: ../../c-api/init_config.rst:1022
13871406msgid "etc."
@@ -1407,7 +1426,7 @@ msgstr ""
14071426#: ../../c-api/init_config.rst:1033
14081427msgid ""
14091428"Move to the \" Main\" initialization phase, finish the Python initialization."
1410- msgstr ""
1429+ msgstr "进入“主要”初始化阶段,完成 Python 初始化。 "
14111430
14121431#: ../../c-api/init_config.rst:1035
14131432msgid ""
@@ -1418,6 +1437,9 @@ msgid ""
14181437" maybe install a custom :data:`sys.meta_path` importer or an import hook, "
14191438"etc."
14201439msgstr ""
1440+ "在“核心”阶段不会导入任何模块,也不会配置 ``importlib`` 模块: :ref:`路径配置 <init-path-config>` "
1441+ "只会在“主要”阶段期间应用。 这可能允许在 Python 中定制 Python 以覆盖或微调 :ref:`路径配置 <init-path-"
1442+ "config>`,也可能会安装自定义的 :data:`sys.meta_path` 导入器或导入钩子等等。"
14211443
14221444#: ../../c-api/init_config.rst:1041
14231445msgid ""
@@ -1438,4 +1460,4 @@ msgstr ""
14381460msgid ""
14391461"Example running Python code between \" Core\" and \" Main\" initialization "
14401462"phases::"
1441- msgstr ""
1463+ msgstr "在“核心”和“主要”初始化阶段之间运行 Python 代码的示例:: "
0 commit comments