blob: 2399278752d13fba099bcfaa55824772605e255b [file] [log] [blame]
Christian Heimesd8654cf2007-12-02 15:22:16 +00001.. highlightlang:: none
2
3.. _using-on-windows:
4
5*************************
6 Using Python on Windows
7*************************
8
9.. sectionauthor:: Robert Lehmann <lehmannro@gmail.com>
Steve Dowerbb240872015-02-05 22:08:48 -080010.. sectionauthor:: Steve Dower <steve.dower@microsoft.com>
Christian Heimesd8654cf2007-12-02 15:22:16 +000011
12This document aims to give an overview of Windows-specific behaviour you should
13know about when using Python on Microsoft Windows.
14
Christian Heimesd8654cf2007-12-02 15:22:16 +000015Installing Python
16=================
17
Steve Dowerbb240872015-02-05 22:08:48 -080018Unlike most Unix systems and services, Windows does not include a system
19supported installation of Python. To make Python available, the CPython team
Christian Heimesd8654cf2007-12-02 15:22:16 +000020has compiled Windows installers (MSI packages) with every `release
Steve Dowerbb240872015-02-05 22:08:48 -080021<https://www.python.org/download/releases/>`_ for many years. These installers
Steve Dower9a578d92015-05-02 22:28:58 -070022are primarily intended to add a per-user installation of Python, with the
23core interpreter and library being used by a single user. The installer is also
24able to install for all users of a single machine, and a separate ZIP file is
25available for application-local distributions.
Steve Dowerbb240872015-02-05 22:08:48 -080026
Brett Cannon85622e42015-12-27 12:08:37 -080027Supported Versions
28------------------
29
30As specified in :pep:`11`, a Python release only supports a Windows platform
31while Microsoft considers the platform under extended support. This means that
32Python 3.5 supports Windows Vista and newer. If you require Windows XP support
33then please install Python 3.4.
34
Steve Dowerbb240872015-02-05 22:08:48 -080035Installation Steps
36------------------
37
38Four Python 3.5 installers are available for download - two each for the 32-bit
39and 64-bit versions of the interpreter. The *web installer* is a small initial
40download, and it will automatically download the required components as
41necessary. The *offline installer* includes the components necessary for a
42default installation and only requires an internet connection for optional
43features. See :ref:`install-layout-option` for other ways to avoid downloading
44during installation.
45
Steve Dower9a578d92015-05-02 22:28:58 -070046After starting the installer, one of two options may be selected:
Steve Dowerbb240872015-02-05 22:08:48 -080047
48.. image:: win_installer.png
49
Steve Dower9a578d92015-05-02 22:28:58 -070050If you select "Install Now":
Steve Dowerbb240872015-02-05 22:08:48 -080051
Steve Dower9a578d92015-05-02 22:28:58 -070052* You will *not* need to be an administrator (unless a system update for the
Steve Dowereb3c16d2015-08-08 09:09:01 -070053 C Runtime Library is required or you install the :ref:`launcher` for all
54 users)
Steve Dowerbb240872015-02-05 22:08:48 -080055* Python will be installed into your user directory
Steve Dowereb3c16d2015-08-08 09:09:01 -070056* The :ref:`launcher` will be installed according to the option at the bottom
57 of the first pace
Steve Dowerbb240872015-02-05 22:08:48 -080058* The standard library, test suite, launcher and pip will be installed
Steve Dower9a578d92015-05-02 22:28:58 -070059* If selected, the install directory will be added to your :envvar:`PATH`
60* Shortcuts will only be visible for the current user
Steve Dowerbb240872015-02-05 22:08:48 -080061
62Selecting "Customize installation" will allow you to select the features to
63install, the installation location and other options or post-install actions.
64To install debugging symbols or binaries, you will need to use this option.
65
Steve Dower9a578d92015-05-02 22:28:58 -070066To perform an all-users installation, you should select "Customize
67installation". In this case:
68
69* You may be required to provide administrative credentials or approval
70* Python will be installed into the Program Files directory
71* The :ref:`launcher` will be installed into the Windows directory
72* Optional features may be selected during installation
Steve Dowereb3c16d2015-08-08 09:09:01 -070073* The standard library can be pre-compiled to bytecode
Steve Dower9a578d92015-05-02 22:28:58 -070074* If selected, the install directory will be added to the system :envvar:`PATH`
75* Shortcuts are available for all users
76
Steve Dowerbb240872015-02-05 22:08:48 -080077.. _install-quiet-option:
78
79Installing Without UI
80---------------------
81
82All of the options available in the installer UI can also be specified from the
83command line, allowing scripted installers to replicate an installation on many
84machines without user interaction. These options may also be set without
85suppressing the UI in order to change some of the defaults.
86
87To completely hide the installer UI and install Python silently, pass the
Steve Dowercb0afc82015-09-11 08:47:42 -070088``/quiet`` option. To skip past the user interaction but still display
89progress and errors, pass the ``/passive`` option. The ``/uninstall``
Steve Dowerbb240872015-02-05 22:08:48 -080090option may be passed to immediately begin removing Python - no prompt will be
91displayed.
92
93All other options are passed as ``name=value``, where the value is usually
94``0`` to disable a feature, ``1`` to enable a feature, or a path. The full list
95of available options is shown below.
96
97+---------------------------+--------------------------------------+--------------------------+
98| Name | Description | Default |
99+===========================+======================================+==========================+
Steve Dower9b608e52015-09-13 14:39:26 -0700100| InstallAllUsers | Perform a system-wide installation. | 0 |
Steve Dowerbb240872015-02-05 22:08:48 -0800101+---------------------------+--------------------------------------+--------------------------+
102| TargetDir | The installation directory | Selected based on |
103| | | InstallAllUsers |
104+---------------------------+--------------------------------------+--------------------------+
105| DefaultAllUsersTargetDir | The default installation directory | :file:`%ProgramFiles%\\\ |
106| | for all-user installs | Python X.Y` or :file:`\ |
107| | | %ProgramFiles(x86)%\\\ |
108| | | Python X.Y` |
109+---------------------------+--------------------------------------+--------------------------+
110| DefaultJustForMeTargetDir | The default install directory for | :file:`%LocalAppData%\\\ |
111| | just-for-me installs | Programs\\PythonXY` or |
112| | | :file:`%LocalAppData%\\\ |
113| | | Programs\\PythonXY-32` |
114+---------------------------+--------------------------------------+--------------------------+
115| DefaultCustomTargetDir | The default custom install directory | (empty) |
116| | displayed in the UI | |
117+---------------------------+--------------------------------------+--------------------------+
118| AssociateFiles | Create file associations if the | 1 |
119| | launcher is also installed. | |
120+---------------------------+--------------------------------------+--------------------------+
121| CompileAll | Compile all ``.py`` files to | 0 |
Brett Cannonf299abd2015-04-13 14:21:02 -0400122| | ``.pyc``. | |
Steve Dowerbb240872015-02-05 22:08:48 -0800123+---------------------------+--------------------------------------+--------------------------+
124| PrependPath | Add install and Scripts directories | 0 |
125| | tho :envvar:`PATH` and ``.PY`` to | |
126| | :envvar:`PATHEXT` | |
127+---------------------------+--------------------------------------+--------------------------+
Steve Dower1d4880d2015-05-03 14:54:32 -0700128| Shortcuts | Create shortcuts for the interpreter,| 1 |
129| | documentation and IDLE if installed. | |
130+---------------------------+--------------------------------------+--------------------------+
Steve Dowerbb240872015-02-05 22:08:48 -0800131| Include_doc | Install Python manual | 1 |
132+---------------------------+--------------------------------------+--------------------------+
133| Include_debug | Install debug binaries | 0 |
134+---------------------------+--------------------------------------+--------------------------+
135| Include_dev | Install developer headers and | 1 |
136| | libraries | |
137+---------------------------+--------------------------------------+--------------------------+
138| Include_exe | Install :file:`python.exe` and | 1 |
139| | related files | |
140+---------------------------+--------------------------------------+--------------------------+
141| Include_launcher | Install :ref:`launcher`. | 1 |
142+---------------------------+--------------------------------------+--------------------------+
Steve Dower2237bdc2015-07-16 16:33:55 -0700143| InstallLauncherAllUsers | Installs :ref:`launcher` for all | 1 |
144| | users. | |
145+---------------------------+--------------------------------------+--------------------------+
Steve Dowerbb240872015-02-05 22:08:48 -0800146| Include_lib | Install standard library and | 1 |
147| | extension modules | |
148+---------------------------+--------------------------------------+--------------------------+
149| Include_pip | Install bundled pip and setuptools | 1 |
150+---------------------------+--------------------------------------+--------------------------+
151| Include_symbols | Install debugging symbols (`*`.pdb) | 0 |
152+---------------------------+--------------------------------------+--------------------------+
153| Include_tcltk | Install Tcl/Tk support and IDLE | 1 |
154+---------------------------+--------------------------------------+--------------------------+
155| Include_test | Install standard library test suite | 1 |
156+---------------------------+--------------------------------------+--------------------------+
157| Include_tools | Install utility scripts | 1 |
158+---------------------------+--------------------------------------+--------------------------+
Steve Dowera3d03ec2015-07-18 09:27:52 -0700159| LauncherOnly | Only installs the launcher. This | 0 |
160| | will override most other options. | |
161+---------------------------+--------------------------------------+--------------------------+
Steve Dowerbb240872015-02-05 22:08:48 -0800162| SimpleInstall | Disable most install UI | 0 |
163+---------------------------+--------------------------------------+--------------------------+
Steve Dower2237bdc2015-07-16 16:33:55 -0700164| SimpleInstallDescription | A custom message to display when the | (empty) |
165| | simplified install UI is used. | |
166+---------------------------+--------------------------------------+--------------------------+
Steve Dowerbb240872015-02-05 22:08:48 -0800167
168For example, to silently install a default, system-wide Python installation,
169you could use the following command (from an elevated command prompt)::
170
171 python-3.5.0.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0
172
173To allow users to easily install a personal copy of Python without the test
Steve Dower2237bdc2015-07-16 16:33:55 -0700174suite, you could provide a shortcut with the following command. This will
175display a simplified initial page and disallow customization::
Steve Dowerbb240872015-02-05 22:08:48 -0800176
Steve Dower2237bdc2015-07-16 16:33:55 -0700177 python-3.5.0.exe InstallAllUsers=0 Include_launcher=0 Include_test=0
178 SimpleInstall=1 SimpleInstallDescription="Just for me, no test suite."
Steve Dowerbb240872015-02-05 22:08:48 -0800179
180(Note that omitting the launcher also omits file associations, and is only
181recommended for per-user installs when there is also a system-wide installation
182that included the launcher.)
183
Steve Dower2434aa22015-07-18 09:28:19 -0700184The options listed above can also be provided in a file named ``unattend.xml``
185alongside the executable. This file specifies a list of options and values.
186When a value is provided as an attribute, it will be converted to a number if
187possible. Values provided as element text are always left as strings. This
188example file sets the same options and the previous example::
189
190 <Options>
191 <Option Name="InstallAllUsers" Value="no" />
192 <Option Name="Include_launcher" Value="0" />
193 <Option Name="Include_test" Value="no" />
194 <Option Name="SimpleInstall" Value="yes" />
195 <Option Name="SimpleInstallDescription">Just for me, no test suite</Option>
196 </Options>
197
Steve Dowerbb240872015-02-05 22:08:48 -0800198.. _install-layout-option:
199
200Installing Without Downloading
201------------------------------
202
203As some features of Python are not included in the initial installer download,
204selecting those features may require an internet connection. To avoid this
205need, all possible components may be downloaded on-demand to create a complete
206*layout* that will no longer require an internet connection regardless of the
207selected features. Note that this download may be bigger than required, but
208where a large number of installations are going to be performed it is very
209useful to have a locally cached copy.
210
211Execute the following command from Command Prompt to download all possible
212required files. Remember to substitute ``python-3.5.0.exe`` for the actual
213name of your installer, and to create layouts in their own directories to
214avoid collisions between files with the same name.
215
216::
217
218 python-3.5.0.exe /layout [optional target directory]
219
220You may also specify the ``/quiet`` option to hide the progress display.
221
Steve Dowere248f682016-01-16 11:58:30 -0800222Modifying an install
223--------------------
224
225Once Python has been installed, you can add or remove features through the
226Programs and Features tool that is part of Windows. Select the Python entry and
227choose "Uninstall/Change" to open the installer in maintenance mode.
228
229"Modify" allows you to add or remove features by modifying the checkboxes -
230unchanged checkboxes will not install or remove anything. Some options cannot be
231changed in this mode, such as the install directory; to modify these, you will
232need to remove and then reinstall Python completely.
233
234"Repair" will verify all the files that should be installed using the current
235settings and replace any that have been removed or modified.
236
237"Uninstall" will remove Python entirely, with the exception of the
238:ref:`launcher`, which has its own entry in Programs and Features.
Steve Dowerbb240872015-02-05 22:08:48 -0800239
240Other Platforms
241---------------
Christian Heimesd8654cf2007-12-02 15:22:16 +0000242
243With ongoing development of Python, some platforms that used to be supported
Christian Heimes380f7f22008-02-28 11:19:05 +0000244earlier are no longer supported (due to the lack of users or developers).
Christian Heimesd8654cf2007-12-02 15:22:16 +0000245Check :pep:`11` for details on all unsupported platforms.
246
Christian Heimesd8654cf2007-12-02 15:22:16 +0000247* `Windows CE <http://pythonce.sourceforge.net/>`_ is still supported.
Serhiy Storchaka6dff0202016-05-07 10:49:07 +0300248* The `Cygwin <https://cygwin.com/>`_ installer offers to install the Python
Georg Brandl525d3552014-10-29 10:26:56 +0100249 interpreter as well (cf. `Cygwin package source
Christian Heimesd8654cf2007-12-02 15:22:16 +0000250 <ftp://ftp.uni-erlangen.de/pub/pc/gnuwin32/cygwin/mirrors/cygnus/
251 release/python>`_, `Maintainer releases
252 <http://www.tishler.net/jason/software/python/>`_)
253
Georg Brandl5d941342016-02-26 19:37:12 +0100254See `Python for Windows <https://www.python.org/downloads/windows/>`_
Zachary Warec3cf97b2014-01-17 15:23:42 -0600255for detailed information about platforms with pre-compiled installers.
Christian Heimesd8654cf2007-12-02 15:22:16 +0000256
257.. seealso::
258
Georg Brandl5d941342016-02-26 19:37:12 +0100259 `Python on XP <http://dooling.com/index.php/2006/03/14/python-on-xp-7-minutes-to-hello-world/>`_
Christian Heimesd8654cf2007-12-02 15:22:16 +0000260 "7 Minutes to "Hello World!""
261 by Richard Dooling, 2006
262
Georg Brandl525d3552014-10-29 10:26:56 +0100263 `Installing on Windows <http://www.diveintopython.net/installing_python/windows.html>`_
Christian Heimesd8654cf2007-12-02 15:22:16 +0000264 in "`Dive into Python: Python from novice to pro
Georg Brandl525d3552014-10-29 10:26:56 +0100265 <http://www.diveintopython.net/>`_"
Christian Heimesd8654cf2007-12-02 15:22:16 +0000266 by Mark Pilgrim, 2004,
267 ISBN 1-59059-356-1
268
Serhiy Storchakade886d92016-04-11 17:32:33 +0300269 `For Windows users <http://python.swaroopch.com/installation.html#installation-on-windows>`_
Christian Heimesd8654cf2007-12-02 15:22:16 +0000270 in "Installing Python"
Serhiy Storchakade886d92016-04-11 17:32:33 +0300271 in "`A Byte of Python <http://python.swaroopch.com/>`_"
Christian Heimesd8654cf2007-12-02 15:22:16 +0000272 by Swaroop C H, 2003
273
274
275Alternative bundles
276===================
277
278Besides the standard CPython distribution, there are modified packages including
279additional functionality. The following is a list of popular versions and their
280key features:
281
Georg Brandl5d941342016-02-26 19:37:12 +0100282`ActivePython <https://www.activestate.com/activepython/>`_
Christian Heimesd8654cf2007-12-02 15:22:16 +0000283 Installer with multi-platform compatibility, documentation, PyWin32
284
Georg Brandl5d941342016-02-26 19:37:12 +0100285`Anaconda <https://www.continuum.io/downloads/>`_
Steve Dowerbb240872015-02-05 22:08:48 -0800286 Popular scientific modules (such as numpy, scipy and pandas) and the
287 ``conda`` package manager.
Christian Heimesd8654cf2007-12-02 15:22:16 +0000288
Steve Dowerbb240872015-02-05 22:08:48 -0800289`Canopy <https://www.enthought.com/products/canopy/>`_
290 A "comprehensive Python analysis environment" with editors and other
291 development tools.
292
293`WinPython <https://winpython.github.io/>`_
294 Windows-specific distribution with prebuilt scientific packages and
295 tools for building packages.
296
297Note that these packages may not include the latest versions of Python or
298other libraries, and are not maintained or supported by the core Python team.
Christian Heimes255f53b2007-12-08 15:33:56 +0000299
Christian Heimesd8654cf2007-12-02 15:22:16 +0000300
301
302Configuring Python
303==================
304
Steve Dowerbb240872015-02-05 22:08:48 -0800305To run Python conveniently from a command prompt, you might consider changing
306some default environment variables in Windows. While the installer provides an
307option to configure the PATH and PATHEXT variables for you, this is only
308reliable for a single, system-wide installation. If you regularly use multiple
309versions of Python, consider using the :ref:`launcher`.
Christian Heimesd8654cf2007-12-02 15:22:16 +0000310
311
Brian Curtina86f1852012-08-19 11:22:20 -0500312.. _setting-envvars:
313
Christian Heimesd8654cf2007-12-02 15:22:16 +0000314Excursus: Setting environment variables
315---------------------------------------
316
Steve Dowerbb240872015-02-05 22:08:48 -0800317Windows allows environment variables to be configured permanently at both the
318User level and the System level, or temporarily in a command prompt.
Christian Heimesd8654cf2007-12-02 15:22:16 +0000319
Steve Dowerbb240872015-02-05 22:08:48 -0800320To temporarily set environment variables, open Command Prompt and use the
321:command:`set` command::
Christian Heimesd8654cf2007-12-02 15:22:16 +0000322
Steve Dowerbb240872015-02-05 22:08:48 -0800323 C:\>set PATH=C:\Program Files\Python 3.5;%PATH%
324 C:\>set PYTHONPATH=%PYTHONPATH%;C:\My_python_lib
325 C:\>python
Christian Heimesd8654cf2007-12-02 15:22:16 +0000326
Steve Dowerbb240872015-02-05 22:08:48 -0800327These changes will apply to any further commands executed in that console, and
328will be inherited by any applications started from the console.
329
330Including the variable name within percent signs will expand to the existing
331value, allowing you to add your new value at either the start or the end.
332Modifying :envvar:`PATH` by adding the directory containing
333:program:`python.exe` to the start is a common way to ensure the correct version
334of Python is launched.
335
336To permanently modify the default environment variables, click Start and search
337for 'edit environment variables', or open System properties, :guilabel:`Advanced
338system settings` and click the :guilabel:`Environment Variables` button.
Christian Heimesd8654cf2007-12-02 15:22:16 +0000339In this dialog, you can add or modify User and System variables. To change
340System variables, you need non-restricted access to your machine
341(i.e. Administrator rights).
342
Steve Dowerbb240872015-02-05 22:08:48 -0800343.. note::
Christian Heimesd8654cf2007-12-02 15:22:16 +0000344
Steve Dowerbb240872015-02-05 22:08:48 -0800345 Windows will concatenate User variables *after* System variables, which may
346 cause unexpected results when modifying :envvar:`PATH`.
Christian Heimesd8654cf2007-12-02 15:22:16 +0000347
Steve Dowerbb240872015-02-05 22:08:48 -0800348 The :envvar:`PYTHONPATH` variable is used by all versions of Python 2 and
349 Python 3, so you should not permanently configure this variable unless it
Steve Dower9a578d92015-05-02 22:28:58 -0700350 only includes code that is compatible with all of your installed Python
Steve Dowerbb240872015-02-05 22:08:48 -0800351 versions.
Christian Heimesd8654cf2007-12-02 15:22:16 +0000352
353.. seealso::
354
Georg Brandl5d941342016-02-26 19:37:12 +0100355 https://support.microsoft.com/kb/100843
Christian Heimesd8654cf2007-12-02 15:22:16 +0000356 Environment variables in Windows NT
357
Georg Brandl5d941342016-02-26 19:37:12 +0100358 https://technet.microsoft.com/en-us/library/cc754250.aspx
Steve Dowerbb240872015-02-05 22:08:48 -0800359 The SET command, for temporarily modifying environment variables
360
Georg Brandl5d941342016-02-26 19:37:12 +0100361 https://technet.microsoft.com/en-us/library/cc755104.aspx
Steve Dowerbb240872015-02-05 22:08:48 -0800362 The SETX command, for permanently modifying environment variables
363
Georg Brandl5d941342016-02-26 19:37:12 +0100364 https://support.microsoft.com/kb/310519
Christian Heimesd8654cf2007-12-02 15:22:16 +0000365 How To Manage Environment Variables in Windows XP
366
Serhiy Storchaka6dff0202016-05-07 10:49:07 +0300367 https://www.chem.gla.ac.uk/~louis/software/faq/q1.html
Christian Heimes255f53b2007-12-08 15:33:56 +0000368 Setting Environment variables, Louis J. Farrugia
369
Nick Coghlan349c8022012-09-30 13:00:43 +0530370.. _windows-path-mod:
371
Christian Heimesd8654cf2007-12-02 15:22:16 +0000372Finding the Python executable
373-----------------------------
374
Steve Dowerbb240872015-02-05 22:08:48 -0800375.. versionchanged:: 3.5
Brian Curtina86f1852012-08-19 11:22:20 -0500376
Christian Heimesd8654cf2007-12-02 15:22:16 +0000377Besides using the automatically created start menu entry for the Python
Steve Dowerbb240872015-02-05 22:08:48 -0800378interpreter, you might want to start Python in the command prompt. The
379installer for Python 3.5 and later has an option to set that up for you.
Christian Heimesd8654cf2007-12-02 15:22:16 +0000380
Steve Dowerbb240872015-02-05 22:08:48 -0800381On the first page of the installer, an option labelled "Add Python 3.5 to
382PATH" can be selected to have the installer add the install location into the
383:envvar:`PATH`. The location of the :file:`Scripts\\` folder is also added.
384This allows you to type :command:`python` to run the interpreter, and
385:command:`pip` or . Thus, you can also execute your
Brian Curtina86f1852012-08-19 11:22:20 -0500386scripts with command line options, see :ref:`using-on-cmdline` documentation.
Christian Heimesd8654cf2007-12-02 15:22:16 +0000387
Brian Curtina86f1852012-08-19 11:22:20 -0500388If you don't enable this option at install time, you can always re-run the
Steve Dowerbb240872015-02-05 22:08:48 -0800389installer, select Modify, and enable it. Alternatively, you can manually
390modify the :envvar:`PATH` using the directions in :ref:`setting-envvars`. You
391need to set your :envvar:`PATH` environment variable to include the directory
392of your Python installation, delimited by a semicolon from other entries. An
393example variable could look like this (assuming the first two entries already
394existed)::
Brian Curtina86f1852012-08-19 11:22:20 -0500395
Steve Dowerbb240872015-02-05 22:08:48 -0800396 C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Python 3.5
Christian Heimesd8654cf2007-12-02 15:22:16 +0000397
Vinay Sajipd89dae12012-06-24 11:23:07 +0100398.. _launcher:
399
400Python Launcher for Windows
401===========================
402
403.. versionadded:: 3.3
404
Steve Dowerbb240872015-02-05 22:08:48 -0800405The Python launcher for Windows is a utility which aids in locating and
406executing of different Python versions. It allows scripts (or the
Vinay Sajipd89dae12012-06-24 11:23:07 +0100407command-line) to indicate a preference for a specific Python version, and
408will locate and execute that version.
409
Steve Dowerbb240872015-02-05 22:08:48 -0800410Unlike the :envvar:`PATH` variable, the launcher will correctly select the most
411appropriate version of Python. It will prefer per-user installations over
412system-wide ones, and orders by language version rather than using the most
413recently installed version.
414
Vinay Sajipd89dae12012-06-24 11:23:07 +0100415Getting started
416---------------
417
418From the command-line
419^^^^^^^^^^^^^^^^^^^^^
420
Paul Moore835416c2016-05-22 12:28:41 +0100421.. versionchanged:: 3.6
422
Steve Dowerbb240872015-02-05 22:08:48 -0800423System-wide installations of Python 3.3 and later will put the launcher on your
424:envvar:`PATH`. The launcher is compatible with all available versions of
425Python, so it does not matter which version is installed. To check that the
426launcher is available, execute the following command in Command Prompt:
Vinay Sajipd89dae12012-06-24 11:23:07 +0100427
428::
429
430 py
431
Paul Moore835416c2016-05-22 12:28:41 +0100432You should find that the latest version of Python you have installed is
Vinay Sajipd89dae12012-06-24 11:23:07 +0100433started - it can be exited as normal, and any additional command-line
434arguments specified will be sent directly to Python.
435
Paul Moore835416c2016-05-22 12:28:41 +0100436If you have multiple versions of Python installed (e.g., 2.7 and 3.6) you
437will have noticed that Python 3.6 was started - to launch Python 2.7, try the
Vinay Sajipd89dae12012-06-24 11:23:07 +0100438command:
439
440::
441
Paul Moore835416c2016-05-22 12:28:41 +0100442 py -2.7
Vinay Sajipd89dae12012-06-24 11:23:07 +0100443
Paul Moore835416c2016-05-22 12:28:41 +0100444If you want the latest version of Python 2.x you have installed, try the
445command:
Vinay Sajipd89dae12012-06-24 11:23:07 +0100446
447::
448
Paul Moore835416c2016-05-22 12:28:41 +0100449 py -2
Vinay Sajipd89dae12012-06-24 11:23:07 +0100450
Paul Moore835416c2016-05-22 12:28:41 +0100451You should find the latest version of Python 2.x starts.
Vinay Sajipd89dae12012-06-24 11:23:07 +0100452
Steve Dowerbb240872015-02-05 22:08:48 -0800453If you see the following error, you do not have the launcher installed:
454
455::
456
457 'py' is not recognized as an internal or external command,
458 operable program or batch file.
459
460Per-user installations of Python do not add the launcher to :envvar:`PATH`
461unless the option was selected on installation.
462
Steve Dower76998fe2015-02-26 14:25:33 -0800463Virtual environments
464^^^^^^^^^^^^^^^^^^^^
465
Berker Peksagf2d4e572015-03-02 05:36:19 +0200466.. versionadded:: 3.5
467
Steve Dower76998fe2015-02-26 14:25:33 -0800468If the launcher is run with no explicit Python version specification, and a
469virtual environment (created with the standard library :mod:`venv` module or
470the external ``virtualenv`` tool) active, the launcher will run the virtual
471environment's interpreter rather than the global one. To run the global
472interpreter, either deactivate the virtual environment, or explicitly specify
473the global Python version.
474
Vinay Sajipd89dae12012-06-24 11:23:07 +0100475From a script
476^^^^^^^^^^^^^
477
478Let's create a test Python script - create a file called ``hello.py`` with the
479following contents
480
481::
482
483 #! python
484 import sys
485 sys.stdout.write("hello from Python %s\n" % (sys.version,))
486
487From the directory in which hello.py lives, execute the command:
488
489::
490
491 py hello.py
492
493You should notice the version number of your latest Python 2.x installation
494is printed. Now try changing the first line to be:
495
496::
497
498 #! python3
499
500Re-executing the command should now print the latest Python 3.x information.
501As with the above command-line examples, you can specify a more explicit
502version qualifier. Assuming you have Python 2.6 installed, try changing the
503first line to ``#! python2.6`` and you should find the 2.6 version
504information printed.
505
Paul Moore835416c2016-05-22 12:28:41 +0100506Note that unlike interactive use, a bare "python" will use the latest
507version of Python 2.x that you have installed. This is for backward
508compatibility and for compatibility with Unix, where the command ``python``
509typically refers to Python 2.
510
Vinay Sajipd89dae12012-06-24 11:23:07 +0100511From file associations
512^^^^^^^^^^^^^^^^^^^^^^
513
514The launcher should have been associated with Python files (i.e. ``.py``,
Brett Cannonf299abd2015-04-13 14:21:02 -0400515``.pyw``, ``.pyc`` files) when it was installed. This means that
Vinay Sajipd89dae12012-06-24 11:23:07 +0100516when you double-click on one of these files from Windows explorer the launcher
517will be used, and therefore you can use the same facilities described above to
518have the script specify the version which should be used.
519
520The key benefit of this is that a single launcher can support multiple Python
521versions at the same time depending on the contents of the first line.
522
523Shebang Lines
524-------------
525
526If the first line of a script file starts with ``#!``, it is known as a
527"shebang" line. Linux and other Unix like operating systems have native
528support for such lines and are commonly used on such systems to indicate how
529a script should be executed. This launcher allows the same facilities to be
530using with Python scripts on Windows and the examples above demonstrate their
531use.
532
533To allow shebang lines in Python scripts to be portable between Unix and
534Windows, this launcher supports a number of 'virtual' commands to specify
535which interpreter to use. The supported virtual commands are:
536
537* ``/usr/bin/env python``
538* ``/usr/bin/python``
539* ``/usr/local/bin/python``
540* ``python``
541
542For example, if the first line of your script starts with
543
544::
545
546 #! /usr/bin/python
547
548The default Python will be located and used. As many Python scripts written
549to work on Unix will already have this line, you should find these scripts can
550be used by the launcher without modification. If you are writing a new script
551on Windows which you hope will be useful on Unix, you should use one of the
552shebang lines starting with ``/usr``.
553
Steve Dower76998fe2015-02-26 14:25:33 -0800554Any of the above virtual commands can be suffixed with an explicit version
555(either just the major version, or the major and minor version) - for example
556``/usr/bin/python2.7`` - which will cause that specific version to be located
557and used.
558
559The ``/usr/bin/env`` form of shebang line has one further special property.
560Before looking for installed Python interpreters, this form will search the
561executable :envvar:`PATH` for a Python executable. This corresponds to the
562behaviour of the Unix ``env`` program, which performs a :envvar:`PATH` search.
563
Vinay Sajipd89dae12012-06-24 11:23:07 +0100564Arguments in shebang lines
565--------------------------
566
567The shebang lines can also specify additional options to be passed to the
568Python interpreter. For example, if you have a shebang line:
569
570::
571
572 #! /usr/bin/python -v
573
574Then Python will be started with the ``-v`` option
575
576Customization
577-------------
578
579Customization via INI files
580^^^^^^^^^^^^^^^^^^^^^^^^^^^
581
Steve Dowerbb240872015-02-05 22:08:48 -0800582Two .ini files will be searched by the launcher - ``py.ini`` in the current
583user's "application data" directory (i.e. the directory returned by calling the
584Windows function SHGetFolderPath with CSIDL_LOCAL_APPDATA) and ``py.ini`` in the
585same directory as the launcher. The same .ini files are used for both the
586'console' version of the launcher (i.e. py.exe) and for the 'windows' version
587(i.e. pyw.exe)
Vinay Sajipd89dae12012-06-24 11:23:07 +0100588
Steve Dowerbb240872015-02-05 22:08:48 -0800589Customization specified in the "application directory" will have precedence over
590the one next to the executable, so a user, who may not have write access to the
591.ini file next to the launcher, can override commands in that global .ini file)
Vinay Sajipd89dae12012-06-24 11:23:07 +0100592
593Customizing default Python versions
594^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
595
596In some cases, a version qualifier can be included in a command to dictate
597which version of Python will be used by the command. A version qualifier
598starts with a major version number and can optionally be followed by a period
599('.') and a minor version specifier. If the minor qualifier is specified, it
600may optionally be followed by "-32" to indicate the 32-bit implementation of
601that version be used.
602
603For example, a shebang line of ``#!python`` has no version qualifier, while
604``#!python3`` has a version qualifier which specifies only a major version.
605
606If no version qualifiers are found in a command, the environment variable
607``PY_PYTHON`` can be set to specify the default version qualifier - the default
608value is "2". Note this value could specify just a major version (e.g. "2") or
609a major.minor qualifier (e.g. "2.6"), or even major.minor-32.
610
611If no minor version qualifiers are found, the environment variable
612``PY_PYTHON{major}`` (where ``{major}`` is the current major version qualifier
613as determined above) can be set to specify the full version. If no such option
614is found, the launcher will enumerate the installed Python versions and use
615the latest minor release found for the major version, which is likely,
616although not guaranteed, to be the most recently installed version in that
617family.
618
619On 64-bit Windows with both 32-bit and 64-bit implementations of the same
620(major.minor) Python version installed, the 64-bit version will always be
621preferred. This will be true for both 32-bit and 64-bit implementations of the
622launcher - a 32-bit launcher will prefer to execute a 64-bit Python installation
623of the specified version if available. This is so the behavior of the launcher
624can be predicted knowing only what versions are installed on the PC and
625without regard to the order in which they were installed (i.e., without knowing
626whether a 32 or 64-bit version of Python and corresponding launcher was
627installed last). As noted above, an optional "-32" suffix can be used on a
628version specifier to change this behaviour.
629
630Examples:
631
632* If no relevant options are set, the commands ``python`` and
633 ``python2`` will use the latest Python 2.x version installed and
634 the command ``python3`` will use the latest Python 3.x installed.
635
636* The commands ``python3.1`` and ``python2.7`` will not consult any
637 options at all as the versions are fully specified.
638
639* If ``PY_PYTHON=3``, the commands ``python`` and ``python3`` will both use
640 the latest installed Python 3 version.
641
642* If ``PY_PYTHON=3.1-32``, the command ``python`` will use the 32-bit
643 implementation of 3.1 whereas the command ``python3`` will use the latest
644 installed Python (PY_PYTHON was not considered at all as a major
645 version was specified.)
646
647* If ``PY_PYTHON=3`` and ``PY_PYTHON3=3.1``, the commands
648 ``python`` and ``python3`` will both use specifically 3.1
649
650In addition to environment variables, the same settings can be configured
651in the .INI file used by the launcher. The section in the INI file is
652called ``[defaults]`` and the key name will be the same as the
Ezio Melotti5b69fbd2012-10-19 20:40:18 +0300653environment variables without the leading ``PY_`` prefix (and note that
Vinay Sajipd89dae12012-06-24 11:23:07 +0100654the key names in the INI file are case insensitive.) The contents of
655an environment variable will override things specified in the INI file.
656
657For example:
658
659* Setting ``PY_PYTHON=3.1`` is equivalent to the INI file containing:
660
661::
662
663 [defaults]
664 python=3.1
665
666* Setting ``PY_PYTHON=3`` and ``PY_PYTHON3=3.1`` is equivalent to the INI file
667 containing:
668
669::
670
671 [defaults]
672 python=3
673 python3=3.1
674
675Diagnostics
676-----------
677
678If an environment variable ``PYLAUNCH_DEBUG`` is set (to any value), the
679launcher will print diagnostic information to stderr (i.e. to the console).
680While this information manages to be simultaneously verbose *and* terse, it
681should allow you to see what versions of Python were located, why a
682particular version was chosen and the exact command-line used to execute the
683target Python.
684
685
Steve Dowerbb240872015-02-05 22:08:48 -0800686
Steve Dowereb3c16d2015-08-08 09:09:01 -0700687.. finding_modules:
688
Steve Dowerbb240872015-02-05 22:08:48 -0800689Finding modules
690===============
691
692Python usually stores its library (and thereby your site-packages folder) in the
693installation directory. So, if you had installed Python to
694:file:`C:\\Python\\`, the default library would reside in
695:file:`C:\\Python\\Lib\\` and third-party modules should be stored in
696:file:`C:\\Python\\Lib\\site-packages\\`.
697
698This is how :data:`sys.path` is populated on Windows:
699
700* An empty entry is added at the start, which corresponds to the current
701 directory.
702
703* If the environment variable :envvar:`PYTHONPATH` exists, as described in
704 :ref:`using-on-envvars`, its entries are added next. Note that on Windows,
705 paths in this variable must be separated by semicolons, to distinguish them
706 from the colon used in drive identifiers (``C:\`` etc.).
707
708* Additional "application paths" can be added in the registry as subkeys of
709 :samp:`\\SOFTWARE\\Python\\PythonCore\\{version}\\PythonPath` under both the
710 ``HKEY_CURRENT_USER`` and ``HKEY_LOCAL_MACHINE`` hives. Subkeys which have
711 semicolon-delimited path strings as their default value will cause each path
712 to be added to :data:`sys.path`. (Note that all known installers only use
713 HKLM, so HKCU is typically empty.)
714
715* If the environment variable :envvar:`PYTHONHOME` is set, it is assumed as
716 "Python Home". Otherwise, the path of the main Python executable is used to
717 locate a "landmark file" (``Lib\os.py``) to deduce the "Python Home". If a
718 Python home is found, the relevant sub-directories added to :data:`sys.path`
719 (``Lib``, ``plat-win``, etc) are based on that folder. Otherwise, the core
720 Python path is constructed from the PythonPath stored in the registry.
721
722* If the Python Home cannot be located, no :envvar:`PYTHONPATH` is specified in
723 the environment, and no registry entries can be found, a default path with
724 relative entries is used (e.g. ``.\Lib;.\plat-win``, etc).
725
Steve Dower4a7fe7e2015-05-22 15:10:10 -0700726If a ``pyvenv.cfg`` file is found alongside the main executable or in the
727directory one level above the executable, the following variations apply:
728
729* If ``home`` is an absolute path and :envvar:`PYTHONHOME` is not set, this
730 path is used instead of the path to the main executable when deducing the
731 home location.
732
733* If ``applocal`` is set to true, the ``home`` property or the main executable
734 is always used as the home path, and all environment variables or registry
735 values affecting the path are ignored. The landmark file is not checked.
736
Steve Dowerbb240872015-02-05 22:08:48 -0800737The end result of all this is:
738
739* When running :file:`python.exe`, or any other .exe in the main Python
740 directory (either an installed version, or directly from the PCbuild
741 directory), the core path is deduced, and the core paths in the registry are
742 ignored. Other "application paths" in the registry are always read.
743
744* When Python is hosted in another .exe (different directory, embedded via COM,
745 etc), the "Python Home" will not be deduced, so the core path from the
746 registry is used. Other "application paths" in the registry are always read.
747
Steve Dower4a7fe7e2015-05-22 15:10:10 -0700748* If Python can't find its home and there are no registry value (frozen .exe,
749 some very strange installation setup) you get a path with some default, but
Steve Dowerbb240872015-02-05 22:08:48 -0800750 relative, paths.
751
752For those who want to bundle Python into their application or distribution, the
753following advice will prevent conflicts with other installations:
754
Steve Dower4a7fe7e2015-05-22 15:10:10 -0700755* Include a ``pyvenv.cfg`` file alongside your executable containing
756 ``applocal = true``. This will ensure that your own directory will be used to
757 resolve paths even if you have included the standard library in a ZIP file.
Steve Dowereb3c16d2015-08-08 09:09:01 -0700758 It will also ignore user site-packages and other paths listed in the
759 registry.
Steve Dower4a7fe7e2015-05-22 15:10:10 -0700760
Steve Dowerbb240872015-02-05 22:08:48 -0800761* If you are loading :file:`python3.dll` or :file:`python35.dll` in your own
762 executable, explicitly call :c:func:`Py_SetPath` or (at least)
763 :c:func:`Py_SetProgramName` before :c:func:`Py_Initialize`.
764
765* Clear and/or overwrite :envvar:`PYTHONPATH` and set :envvar:`PYTHONHOME`
766 before launching :file:`python.exe` from your application.
767
768* If you cannot use the previous suggestions (for example, you are a
769 distribution that allows people to run :file:`python.exe` directly), ensure
Steve Dower4a7fe7e2015-05-22 15:10:10 -0700770 that the landmark file (:file:`Lib\\os.py`) exists in your install directory.
Steve Dowerbb240872015-02-05 22:08:48 -0800771 (Note that it will not be detected inside a ZIP file.)
772
773These will ensure that the files in a system-wide installation will not take
774precedence over the copy of the standard library bundled with your application.
Steve Dowereb3c16d2015-08-08 09:09:01 -0700775Otherwise, your users may experience problems using your application. Note that
776the first suggestion is the best, as the other may still be susceptible to
777non-standard paths in the registry and user site-packages.
Steve Dowerbb240872015-02-05 22:08:48 -0800778
Christian Heimesd8654cf2007-12-02 15:22:16 +0000779Additional modules
780==================
781
782Even though Python aims to be portable among all platforms, there are features
783that are unique to Windows. A couple of modules, both in the standard library
784and external, and snippets exist to use these features.
785
786The Windows-specific standard modules are documented in
787:ref:`mswin-specific-services`.
788
Christian Heimesd8654cf2007-12-02 15:22:16 +0000789PyWin32
790-------
791
Georg Brandl5d941342016-02-26 19:37:12 +0100792The `PyWin32 <https://pypi.python.org/pypi/pywin32>`_ module by Mark Hammond
Christian Heimesd8654cf2007-12-02 15:22:16 +0000793is a collection of modules for advanced Windows-specific support. This includes
Georg Brandl2ee470f2008-07-16 12:55:28 +0000794utilities for:
Christian Heimesd8654cf2007-12-02 15:22:16 +0000795
Georg Brandl5d941342016-02-26 19:37:12 +0100796* `Component Object Model <https://www.microsoft.com/com/>`_ (COM)
Christian Heimesd8654cf2007-12-02 15:22:16 +0000797* Win32 API calls
798* Registry
799* Event log
Georg Brandl5d941342016-02-26 19:37:12 +0100800* `Microsoft Foundation Classes <https://msdn.microsoft.com/en-us/library/fe1cf721%28VS.80%29.aspx>`_ (MFC)
Christian Heimesd8654cf2007-12-02 15:22:16 +0000801 user interfaces
802
Georg Brandl5d941342016-02-26 19:37:12 +0100803`PythonWin <https://web.archive.org/web/20060524042422/
Georg Brandle73778c2014-10-29 08:36:35 +0100804https://www.python.org/windows/pythonwin/>`_ is a sample MFC application
Christian Heimesd8654cf2007-12-02 15:22:16 +0000805shipped with PyWin32. It is an embeddable IDE with a built-in debugger.
806
807.. seealso::
808
809 `Win32 How Do I...? <http://timgolden.me.uk/python/win32_how_do_i.html>`_
810 by Tim Golden
811
812 `Python and COM <http://www.boddie.org.uk/python/COM.html>`_
813 by David and Paul Boddie
814
815
Zachary Warec3cf97b2014-01-17 15:23:42 -0600816cx_Freeze
817---------
Christian Heimesd8654cf2007-12-02 15:22:16 +0000818
Zachary Warec3cf97b2014-01-17 15:23:42 -0600819`cx_Freeze <http://cx-freeze.sourceforge.net/>`_ is a :mod:`distutils`
820extension (see :ref:`extending-distutils`) which wraps Python scripts into
821executable Windows programs (:file:`{*}.exe` files). When you have done this,
822you can distribute your application without requiring your users to install
823Python.
Christian Heimesd8654cf2007-12-02 15:22:16 +0000824
825
826WConio
827------
828
829Since Python's advanced terminal handling layer, :mod:`curses`, is restricted to
830Unix-like systems, there is a library exclusive to Windows as well: Windows
831Console I/O for Python.
832
833`WConio <http://newcenturycomputers.net/projects/wconio.html>`_ is a wrapper for
834Turbo-C's :file:`CONIO.H`, used to create text user interfaces.
835
836
837
838Compiling Python on Windows
839===========================
840
841If you want to compile CPython yourself, first thing you should do is get the
Georg Brandl5d941342016-02-26 19:37:12 +0100842`source <https://www.python.org/downloads/source/>`_. You can download either the
Christian Heimesd8654cf2007-12-02 15:22:16 +0000843latest release's source or just grab a fresh `checkout
Georg Brandlb7354a62014-10-29 10:57:37 +0100844<https://docs.python.org/devguide/setup.html#getting-the-source-code>`_.
Christian Heimesd8654cf2007-12-02 15:22:16 +0000845
Zachary Waref8ceb042013-11-30 16:59:33 -0600846The source tree contains a build solution and project files for Microsoft
Steve Dowerbb240872015-02-05 22:08:48 -0800847Visual Studio 2015, which is the compiler used to build the official Python
848releases. These files are in the :file:`PCbuild` directory.
Christian Heimesd8654cf2007-12-02 15:22:16 +0000849
Zachary Waref8ceb042013-11-30 16:59:33 -0600850Check :file:`PCbuild/readme.txt` for general information on the build process.
Christian Heimesd8654cf2007-12-02 15:22:16 +0000851
852
853For extension modules, consult :ref:`building-on-windows`.
854
855.. seealso::
856
857 `Python + Windows + distutils + SWIG + gcc MinGW <http://sebsauvage.net/python/mingw.html>`_
858 or "Creating Python extensions in C/C++ with SWIG and compiling them with
859 MinGW gcc under Windows" or "Installing Python extension with distutils
860 and without Microsoft Visual C++" by Sébastien Sauvage, 2003
861
Georg Brandl495f7b52009-10-27 15:28:25 +0000862 `MingW -- Python extensions <http://oldwiki.mingw.org/index.php/Python%20extensions>`_
Christian Heimesd8654cf2007-12-02 15:22:16 +0000863 by Trent Apted et al, 2007
864
865
Steve Dowereb3c16d2015-08-08 09:09:01 -0700866Embedded Distribution
867=====================
868
869.. versionadded:: 3.5
870
871The embedded distribution is a ZIP file containing a minimal Python environment.
872It is intended for acting as part of another application, rather than being
873directly accessed by end-users.
874
875When extracted, the embedded distribution is (almost) fully isolated from the
876user's system, including environment variables, system registry settings, and
877installed packages. The standard library is included as pre-compiled and
878optimized ``.pyc`` files in a ZIP, and ``python3.dll``, ``python35.dll``,
879``python.exe`` and ``pythonw.exe`` are all provided. Tcl/tk (including all
880dependants, such as Idle), pip and the Python documentation are not included.
881
882.. note::
883
884 The embedded distribution does not include the `Microsoft C Runtime
Georg Brandl5d941342016-02-26 19:37:12 +0100885 <https://www.microsoft.com/en-us/download/details.aspx?id=48145>`_ and it is
Steve Dowereb3c16d2015-08-08 09:09:01 -0700886 the responsibility of the application installer to provide this. The
887 runtime may have already been installed on a user's system previously or
888 automatically via Windows Update, and can be detected by finding
889 ``ucrtbase.dll`` in the system directory.
890
891Third-party packages should be installed by the application installer alongside
892the embedded distribution. Using pip to manage dependencies as for a regular
893Python installation is not supported with this distribution, though with some
894care it may be possible to include and use pip for automatic updates. In
895general, third-party packages should be treated as part of the application
896("vendoring") so that the developer can ensure compatibility with newer
897versions before providing updates to users.
898
899The two recommended use cases for this distribution are described below.
900
901Python Application
902------------------
903
904An application written in Python does not necessarily require users to be aware
905of that fact. The embedded distribution may be used in this case to include a
906private version of Python in an install package. Depending on how transparent it
907should be (or conversely, how professional it should appear), there are two
908options.
909
910Using a specialized executable as a launcher requires some coding, but provides
911the most transparent experience for users. With a customized launcher, there are
912no obvious indications that the program is running on Python: icons can be
913customized, company and version information can be specified, and file
914associations behave properly. In most cases, a custom launcher should simply be
915able to call ``Py_Main`` with a hard-coded command line.
916
917The simpler approach is to provide a batch file or generated shortcut that
918directly calls the ``python.exe`` or ``pythonw.exe`` with the required
919command-line arguments. In this case, the application will appear to be Python
920and not its actual name, and users may have trouble distinguishing it from other
921running Python processes or file associations.
922
923With the latter approach, packages should be installed as directories alongside
924the Python executable to ensure they are available on the path. With the
925specialized launcher, packages can be located in other locations as there is an
926opportunity to specify the search path before launching the application.
927
928Embedding Python
929----------------
930
931Applications written in native code often require some form of scripting
932language, and the embedded Python distribution can be used for this purpose. In
933general, the majority of the application is in native code, and some part will
934either invoke ``python.exe`` or directly use ``python3.dll``. For either case,
935extracting the embedded distribution to a subdirectory of the application
936installation is sufficient to provide a loadable Python interpreter.
937
938As with the application use, packages can be installed to any location as there
939is an opportunity to specify search paths before initializing the interpreter.
940Otherwise, there is no fundamental differences between using the embedded
941distribution and a regular installation.
942
Christian Heimesd8654cf2007-12-02 15:22:16 +0000943Other resources
944===============
945
946.. seealso::
947
Georg Brandlb7354a62014-10-29 10:57:37 +0100948 `Python Programming On Win32 <http://shop.oreilly.com/product/9781565926219.do>`_
Christian Heimesd8654cf2007-12-02 15:22:16 +0000949 "Help for Windows Programmers"
950 by Mark Hammond and Andy Robinson, O'Reilly Media, 2000,
951 ISBN 1-56592-621-8
952
953 `A Python for Windows Tutorial <http://www.imladris.com/Scripts/PythonForWindows.html>`_
954 by Amanda Birmingham, 2004
955
Vinay Sajipd89dae12012-06-24 11:23:07 +0100956 :pep:`397` - Python launcher for Windows
957 The proposal for the launcher to be included in the Python distribution.