@@ -29,13 +29,13 @@ Supported Versions
2929
3030As specified in :pep: `11 `, a Python release only supports a Windows platform
3131while Microsoft considers the platform under extended support. This means that
32- Python 3.5 supports Windows Vista and newer. If you require Windows XP support
32+ Python 3.6 supports Windows Vista and newer. If you require Windows XP support
3333then please install Python 3.4.
3434
3535Installation Steps
3636------------------
3737
38- Four Python 3.5 installers are available for download - two each for the 32-bit
38+ Four Python 3.6 installers are available for download - two each for the 32-bit
3939and 64-bit versions of the interpreter. The *web installer * is a small initial
4040download, and it will automatically download the required components as
4141necessary. The *offline installer * includes the components necessary for a
@@ -193,13 +193,13 @@ of available options is shown below.
193193For example, to silently install a default, system-wide Python installation,
194194you could use the following command (from an elevated command prompt)::
195195
196- python-3.5 .0.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0
196+ python-3.6 .0.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0
197197
198198To allow users to easily install a personal copy of Python without the test
199199suite, you could provide a shortcut with the following command. This will
200200display a simplified initial page and disallow customization::
201201
202- python-3.5 .0.exe InstallAllUsers=0 Include_launcher=0 Include_test=0
202+ python-3.6 .0.exe InstallAllUsers=0 Include_launcher=0 Include_test=0
203203 SimpleInstall=1 SimpleInstallDescription="Just for me, no test suite."
204204
205205(Note that omitting the launcher also omits file associations, and is only
@@ -234,13 +234,13 @@ where a large number of installations are going to be performed it is very
234234useful to have a locally cached copy.
235235
236236Execute the following command from Command Prompt to download all possible
237- required files. Remember to substitute ``python-3.5 .0.exe `` for the actual
237+ required files. Remember to substitute ``python-3.6 .0.exe `` for the actual
238238name of your installer, and to create layouts in their own directories to
239239avoid collisions between files with the same name.
240240
241241::
242242
243- python-3.5 .0.exe /layout [optional target directory]
243+ python-3.6 .0.exe /layout [optional target directory]
244244
245245You may also specify the ``/quiet `` option to hide the progress display.
246246
@@ -345,7 +345,7 @@ User level and the System level, or temporarily in a command prompt.
345345To temporarily set environment variables, open Command Prompt and use the
346346:command: `set ` command::
347347
348- C:\>set PATH=C:\Program Files\Python 3.5 ;%PATH%
348+ C:\>set PATH=C:\Program Files\Python 3.6 ;%PATH%
349349 C:\>set PYTHONPATH=%PYTHONPATH%;C:\My_python_lib
350350 C:\>python
351351
@@ -401,10 +401,10 @@ Finding the Python executable
401401
402402Besides using the automatically created start menu entry for the Python
403403interpreter, you might want to start Python in the command prompt. The
404- installer for Python 3.5 and later has an option to set that up for you.
404+ installer for Python 3.6 has an option to set that up for you.
405405
406- On the first page of the installer, an option labelled "Add Python 3.5 to
407- PATH" can be selected to have the installer add the install location into the
406+ On the first page of the installer, an option labelled "Add Python to PATH"
407+ may be selected to have the installer add the install location into the
408408:envvar: `PATH `. The location of the :file: `Scripts\\ ` folder is also added.
409409This allows you to type :command: `python ` to run the interpreter, and
410410:command: `pip ` for the package installer. Thus, you can also execute your
@@ -418,7 +418,7 @@ of your Python installation, delimited by a semicolon from other entries. An
418418example variable could look like this (assuming the first two entries already
419419existed)::
420420
421- C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Python 3.5
421+ C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Python 3.6
422422
423423.. _launcher :
424424
@@ -720,7 +720,15 @@ installation directory. So, if you had installed Python to
720720:file: `C:\\ Python\\ Lib\\ ` and third-party modules should be stored in
721721:file: `C:\\ Python\\ Lib\\ site-packages\\ `.
722722
723- This is how :data: `sys.path ` is populated on Windows:
723+ To completely override :data: `sys.path `, create a text file named ``'sys.path' ``
724+ containing a list of paths alongside the Python executable. This will ignore all
725+ registry settings and environment variables, enable isolated mode, disable
726+ importing :mod: `site `, and fill :data: `sys.path ` with exactly the paths listed
727+ in the file. Paths may be absolute or relative to the directory containing the
728+ file.
729+
730+ When the ``'sys.path' `` file is missing, this is how :data: `sys.path ` is
731+ populated on Windows:
724732
725733* An empty entry is added at the start, which corresponds to the current
726734 directory.
@@ -755,10 +763,6 @@ directory one level above the executable, the following variations apply:
755763 path is used instead of the path to the main executable when deducing the
756764 home location.
757765
758- * If ``applocal `` is set to true, the ``home `` property or the main executable
759- is always used as the home path, and all environment variables or registry
760- values affecting the path are ignored. The landmark file is not checked.
761-
762766The end result of all this is:
763767
764768* When running :file: `python.exe `, or any other .exe in the main Python
@@ -777,13 +781,11 @@ The end result of all this is:
777781For those who want to bundle Python into their application or distribution, the
778782following advice will prevent conflicts with other installations:
779783
780- * Include a ``pyvenv.cfg `` file alongside your executable containing
781- ``applocal = true ``. This will ensure that your own directory will be used to
782- resolve paths even if you have included the standard library in a ZIP file.
783- It will also ignore user site-packages and other paths listed in the
784- registry.
784+ * Include a ``sys.path `` file alongside your executable containing the
785+ directories to include. This will ignore user site-packages and other paths
786+ listed in the registry or in environment variables.
785787
786- * If you are loading :file: `python3.dll ` or :file: `python35 .dll ` in your own
788+ * If you are loading :file: `python3.dll ` or :file: `python36 .dll ` in your own
787789 executable, explicitly call :c:func: `Py_SetPath ` or (at least)
788790 :c:func: `Py_SetProgramName ` before :c:func: `Py_Initialize `.
789791
@@ -801,6 +803,11 @@ Otherwise, your users may experience problems using your application. Note that
801803the first suggestion is the best, as the other may still be susceptible to
802804non-standard paths in the registry and user site-packages.
803805
806+ .. versionchanged :: 3.6
807+
808+ Adds ``sys.path `` file support and removes ``applocal `` option from
809+ ``pyvenv.cfg ``.
810+
804811Additional modules
805812==================
806813
@@ -900,7 +907,7 @@ directly accessed by end-users.
900907When extracted, the embedded distribution is (almost) fully isolated from the
901908user's system, including environment variables, system registry settings, and
902909installed packages. The standard library is included as pre-compiled and
903- optimized ``.pyc `` files in a ZIP, and ``python3.dll ``, ``python35 .dll ``,
910+ optimized ``.pyc `` files in a ZIP, and ``python3.dll ``, ``python36 .dll ``,
904911``python.exe `` and ``pythonw.exe `` are all provided. Tcl/tk (including all
905912dependants, such as Idle), pip and the Python documentation are not included.
906913
0 commit comments