@@ -1522,12 +1522,16 @@ msgid ""
15221522"installed Python (PY_PYTHON was not considered at all as a major version was"
15231523" specified.)"
15241524msgstr ""
1525+ "如果 ``PY_PYTHON=3.1-32`` ,命令 ``python`` 将使用3.1的32位实现,而命令 ``python3`` "
1526+ "将使用最新安装的Python(PY_PYTHON根本没有被视为指定了主要版本。)"
15251527
15261528#: ../../using/windows.rst:857
15271529msgid ""
15281530"If ``PY_PYTHON=3`` and ``PY_PYTHON3=3.1``, the commands ``python`` and "
15291531"``python3`` will both use specifically 3.1"
15301532msgstr ""
1533+ "如果 ``PY_PYTHON=3`` 且 ``PY_PYTHON3=3.1``,命令 ``python`` 和 ``python3`` "
1534+ "都将特别使用3.1"
15311535
15321536#: ../../using/windows.rst:860
15331537msgid ""
@@ -1538,6 +1542,8 @@ msgid ""
15381542" the INI file are case insensitive.) The contents of an environment "
15391543"variable will override things specified in the INI file."
15401544msgstr ""
1545+ "除环境变量外,还可以在启动程序使用的.INI文件中配置相同的设置。 INI文件中的部分称为 ``[defaults]`` ,键名称将与没有前导 "
1546+ "``PY_`` 前缀的环境变量相同(并注意INI文件中的键名不区分大小写) 。)环境变量的内容将覆盖INI文件中指定的内容。"
15411547
15421548#: ../../using/windows.rst:867
15431549msgid "For example:"
@@ -1594,6 +1600,9 @@ msgid ""
15941600"allows paths to be restricted for any program loading the runtime if "
15951601"desired."
15961602msgstr ""
1603+ "若要完全覆盖 :data:`sys.path` ,请创建与DLL(``python37._pth``)或可执行文件(“python._pth`”)同名的"
1604+ " ``._pth`` 文件,并为要添加的每个路径指定一行 :data:`sys.path` "
1605+ "。基于DLL名称的文件覆盖基于可执行文件的文件,如果需要,可以为加载运行时的任何程序限制路径。"
15971606
15981607#: ../../using/windows.rst:914
15991608msgid ""
@@ -1604,24 +1613,27 @@ msgid ""
16041613"the file. Import statements other than to ``site`` are not permitted, and "
16051614"arbitrary code cannot be specified."
16061615msgstr ""
1616+ "当文件存在时,将忽略所有注册表和环境变量,启用隔离模式,并且:除非文件中的一行指定 :mod:`site` ,否则不会导入 :mod:`site` "
1617+ "。以 ``#`` 开头的空白路径和行将被忽略。每个路径可以是绝对的或相对于文件的位置。不允许使用除 ``site`` "
1618+ "以外的导入语句,并且不能指定任意代码。"
16071619
16081620#: ../../using/windows.rst:921
16091621msgid ""
16101622"Note that ``.pth`` files (without leading underscore) will be processed "
16111623"normally by the :mod:`site` module when ``import site`` has been specified."
1612- msgstr ""
1624+ msgstr "请注意,当指定 ``import site`` 时, ``.pth`` 文件(没有前导下划线)将由 :mod:`site` 模块正常处理。 "
16131625
16141626#: ../../using/windows.rst:924
16151627msgid ""
16161628"When no ``._pth`` file is found, this is how :data:`sys.path` is populated "
16171629"on Windows:"
1618- msgstr ""
1630+ msgstr "当找不到 ``._pth`` 文件时, :data:`sys.path` 是如何在Windows上填充的: "
16191631
16201632#: ../../using/windows.rst:927
16211633msgid ""
16221634"An empty entry is added at the start, which corresponds to the current "
16231635"directory."
1624- msgstr ""
1636+ msgstr "在开始时,添加一个空条目,该条目对应于当前目录。 "
16251637
16261638#: ../../using/windows.rst:930
16271639msgid ""
@@ -1630,6 +1642,8 @@ msgid ""
16301642"paths in this variable must be separated by semicolons, to distinguish them "
16311643"from the colon used in drive identifiers (``C:\\ `` etc.)."
16321644msgstr ""
1645+ "如果环境变量 :envvar:`PYTHONPATH` 存在,如 :ref:`using-on-envvars` "
1646+ "中所述,则接下来添加其条目。请注意,在Windows上,此变量中的路径必须用分号分隔,以区别于驱动器标识符中使用的冒号( ``C:\\ `` 等)。"
16331647
16341648#: ../../using/windows.rst:935
16351649msgid ""
@@ -1651,30 +1665,37 @@ msgid ""
16511665" on that folder. Otherwise, the core Python path is constructed from the "
16521666"PythonPath stored in the registry."
16531667msgstr ""
1668+ "如果设置了环境变量 :envvar:`PYTHONHOME` ,则将其假定为 “Python 主目录” 。否则,主Python可执行文件的路径用于定位"
1669+ " “地标文件” ( ``Lib\\ os.py`` 或 ``pythonXY.zip`` )以推断 ”Python 主目录“ "
1670+ "。如果找到了Python主目录,则基于该文件夹将相关的子目录添加到 :data:`sys.path` (``Lib`` , ``plat-win`` "
1671+ "等)。否则,核心Python路径是从存储在注册表中的PythonPath构造的。"
16541672
16551673#: ../../using/windows.rst:950
16561674msgid ""
16571675"If the Python Home cannot be located, no :envvar:`PYTHONPATH` is specified "
16581676"in the environment, and no registry entries can be found, a default path "
16591677"with relative entries is used (e.g. ``.\\ Lib;.\\ plat-win``, etc)."
16601678msgstr ""
1679+ "如果找不到Python Home,也没有指定 :envvar:`PYTHONPATH` 环境变量,并且找不到注册表项,则使用具有相对条目的默认路径(例如"
1680+ " ``.\\ Lib; .\\ plat-win`` 等等)。"
16611681
16621682#: ../../using/windows.rst:954
16631683msgid ""
16641684"If a ``pyvenv.cfg`` file is found alongside the main executable or in the "
16651685"directory one level above the executable, the following variations apply:"
1666- msgstr ""
1686+ msgstr "如果在主可执行文件旁边或在可执行文件上一级的目录中找到 ``pyvenv.cfg`` 文件,则以下变体适用: "
16671687
16681688#: ../../using/windows.rst:957
16691689msgid ""
16701690"If ``home`` is an absolute path and :envvar:`PYTHONHOME` is not set, this "
16711691"path is used instead of the path to the main executable when deducing the "
16721692"home location."
16731693msgstr ""
1694+ "如果``home`` 是一个绝对路径,并且 :envvar:`PYTHONHOME` 未设置,则在推断起始位置时使用此路径而不是主可执行文件的路径"
16741695
16751696#: ../../using/windows.rst:961
16761697msgid "The end result of all this is:"
1677- msgstr ""
1698+ msgstr "这一切的最终结果是: "
16781699
16791700#: ../../using/windows.rst:963
16801701msgid ""
@@ -1683,6 +1704,8 @@ msgid ""
16831704"directory), the core path is deduced, and the core paths in the registry are"
16841705" ignored. Other \" application paths\" in the registry are always read."
16851706msgstr ""
1707+ "运行 :file:`python.exe` "
1708+ ",或主Python目录中的任何其他.exe(安装版本,或直接来自PCbuild目录)时,推导出核心路径,并忽略注册表中的核心路径。始终读取注册表中的其他“应用程序路径”。"
16861709
16871710#: ../../using/windows.rst:968
16881711msgid ""
@@ -1691,19 +1714,22 @@ msgid ""
16911714"the registry is used. Other \" application paths\" in the registry are "
16921715"always read."
16931716msgstr ""
1717+ "当Python托管在另一个.exe(不同的目录,通过COM嵌入等)时,将不会推断出“Python "
1718+ "Home”,因此使用了来自注册表的核心路径。始终读取注册表中的其他“应用程序路径”。"
16941719
16951720#: ../../using/windows.rst:972
16961721msgid ""
16971722"If Python can't find its home and there are no registry value (frozen .exe, "
16981723"some very strange installation setup) you get a path with some default, but "
16991724"relative, paths."
17001725msgstr ""
1726+ "如果Python找不到它的主目录并且没有注册表值(冻结的.exe,一些非常奇怪的安装设置),那么你会得到一条带有一些默认但相对的路径的路径。"
17011727
17021728#: ../../using/windows.rst:976
17031729msgid ""
17041730"For those who want to bundle Python into their application or distribution, "
17051731"the following advice will prevent conflicts with other installations:"
1706- msgstr ""
1732+ msgstr "对于那些想要将Python捆绑到其应用程序或发行版中的人,以下建议将防止与其他安装冲突: "
17071733
17081734#: ../../using/windows.rst:979
17091735msgid ""
@@ -1712,19 +1738,26 @@ msgid ""
17121738"environment variables, and also ignore :mod:`site` unless ``import site`` is"
17131739" listed."
17141740msgstr ""
1741+ "在您的可执行文件中包含一个 ``._pth`` 文件,其中包含目录。这将忽略注册表和环境变量中列出的路径,并忽略 :mod:`site` ,除非列出 "
1742+ "``import site`` 。"
17151743
17161744#: ../../using/windows.rst:984
17171745msgid ""
17181746"If you are loading :file:`python3.dll` or :file:`python37.dll` in your own "
17191747"executable, explicitly call :c:func:`Py_SetPath` or (at least) "
17201748":c:func:`Py_SetProgramName` before :c:func:`Py_Initialize`."
17211749msgstr ""
1750+ "如果你在自己的可执行文件中加载 :file:`python3.dll` 或 :file:`python37.dll` ,在 "
1751+ ":c:func:`Py_Initialize` 之前,要显式调用 :c:func:`Py_SetPath` 或(至少) "
1752+ ":c:func:`Py_SetProgramName` "
17221753
17231754#: ../../using/windows.rst:988
17241755msgid ""
17251756"Clear and/or overwrite :envvar:`PYTHONPATH` and set :envvar:`PYTHONHOME` "
17261757"before launching :file:`python.exe` from your application."
17271758msgstr ""
1759+ "清除 和/或 覆盖 :envvar:`PYTHONPATH` 并在启动来自应用程序的 :file:`python.exe` 之前设置 "
1760+ ":envvar:`PYTHONHOME` 。"
17281761
17291762#: ../../using/windows.rst:991
17301763msgid ""
@@ -1734,6 +1767,7 @@ msgid ""
17341767"directory. (Note that it will not be detected inside a ZIP file, but a "
17351768"correctly named ZIP file will be detected instead.)"
17361769msgstr ""
1770+ "如果您不能使用前面的建议(例如,您是一个允许人们直接运行:file:`python.exe`的分发版),请确保安装目录中存在地标文件(:file:`Lib\\\\ os.py`)。(请注意,在zip文件中不会检测到该文件,但会检测到正确命名的zip文件。)"
17371771
17381772#: ../../using/windows.rst:997
17391773msgid ""
@@ -1744,18 +1778,19 @@ msgid ""
17441778"still be susceptible to non-standard paths in the registry and user site-"
17451779"packages."
17461780msgstr ""
1781+ "这些将确保系统范围安装中的文件不会优先于与应用程序捆绑在一起的标准库的副本。否则,用户可能会在使用您的应用程序时遇到问题请注意,第一个建议是最好的,因为其他建议可能仍然容易受到注册表和用户站点包中的非标准路径的影响。"
17471782
17481783#: ../../using/windows.rst:1006
17491784msgid ""
17501785"Adds ``._pth`` file support and removes ``applocal`` option from "
17511786"``pyvenv.cfg``."
1752- msgstr ""
1787+ msgstr "添加 ``._pth`` 文件支持并从 ``pyvenv.cfg`` 中删除 ``applocal`` 选项 "
17531788
17541789#: ../../using/windows.rst:1008
17551790msgid ""
17561791"Adds ``pythonXX.zip`` as a potential landmark when directly adjacent to the "
17571792"executable."
1758- msgstr ""
1793+ msgstr "当直接与可执行文件相邻时,添加 ``pythonXX.zip`` 作为潜在的地标。 "
17591794
17601795#: ../../using/windows.rst:1014
17611796msgid ""
@@ -1764,6 +1799,9 @@ msgid ""
17641799"finder is enabled on Windows in 3.6.0 and earlier, but may need to be "
17651800"explicitly added to :attr:`sys.meta_path` in the future."
17661801msgstr ""
1802+ "在 ``Modules`` (不是 ``PythonPath`` )下的注册表中指定的模块可以通过以下方式导入 "
1803+ ":class:`importlib.machinery.WindowsRegistryFinder` "
1804+ "。在Windows上,此查找程序在3.6.0及更早版本的可用,但可能需要在将来显式添加到 :attr:`sys.meta_path` "
17671805
17681806#: ../../using/windows.rst:1020
17691807msgid "Additional modules"
0 commit comments