blob: ae252155baa11d5e9ffabb39f92f4b6b05dac1c9 [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>
10
11This document aims to give an overview of Windows-specific behaviour you should
12know about when using Python on Microsoft Windows.
13
14
15Installing Python
16=================
17
18Unlike most Unix systems and services, Windows does not require Python natively
19and thus does not pre-install a version of Python. However, the CPython team
20has compiled Windows installers (MSI packages) with every `release
21<http://www.python.org/download/releases/>`_ for many years.
22
23With ongoing development of Python, some platforms that used to be supported
Christian Heimes380f7f22008-02-28 11:19:05 +000024earlier are no longer supported (due to the lack of users or developers).
Christian Heimesd8654cf2007-12-02 15:22:16 +000025Check :pep:`11` for details on all unsupported platforms.
26
Christian Heimesd8654cf2007-12-02 15:22:16 +000027* Up to 2.5, Python was still compatible with Windows 95, 98 and ME (but already
28 raised a deprecation warning on installation). For Python 2.6 (and all
29 following releases), this support was dropped and new releases are just
30 expected to work on the Windows NT family.
31* `Windows CE <http://pythonce.sourceforge.net/>`_ is still supported.
32* The `Cygwin <http://cygwin.com/>`_ installer offers to install the `Python
33 interpreter <http://cygwin.com/packages/python>`_ as well; it is located under
34 "Interpreters." (cf. `Cygwin package source
35 <ftp://ftp.uni-erlangen.de/pub/pc/gnuwin32/cygwin/mirrors/cygnus/
36 release/python>`_, `Maintainer releases
37 <http://www.tishler.net/jason/software/python/>`_)
38
39See `Python for Windows (and DOS) <http://www.python.org/download/windows/>`_
40for detailed information about platforms with precompiled installers.
41
42.. seealso::
43
44 `Python on XP <http://www.richarddooling.com/index.php/2006/03/14/python-on-xp-7-minutes-to-hello-world/>`_
45 "7 Minutes to "Hello World!""
46 by Richard Dooling, 2006
47
Sandro Tosi53bcd662011-10-31 17:46:04 +010048 `Installing on Windows <http://diveintopython.net/installing_python/windows.html>`_
Christian Heimesd8654cf2007-12-02 15:22:16 +000049 in "`Dive into Python: Python from novice to pro
Sandro Tosi53bcd662011-10-31 17:46:04 +010050 <http://diveintopython.net/index.html>`_"
Christian Heimesd8654cf2007-12-02 15:22:16 +000051 by Mark Pilgrim, 2004,
52 ISBN 1-59059-356-1
53
54 `For Windows users <http://swaroopch.com/text/Byte_of_Python:Installing_Python#For_Windows_users>`_
55 in "Installing Python"
56 in "`A Byte of Python <http://www.byteofpython.info>`_"
57 by Swaroop C H, 2003
58
59
60Alternative bundles
61===================
62
63Besides the standard CPython distribution, there are modified packages including
64additional functionality. The following is a list of popular versions and their
65key features:
66
67`ActivePython <http://www.activestate.com/Products/activepython/>`_
68 Installer with multi-platform compatibility, documentation, PyWin32
69
Georg Brandl495f7b52009-10-27 15:28:25 +000070`Enthought Python Distribution <http://www.enthought.com/products/epd.php>`_
Christian Heimesd8654cf2007-12-02 15:22:16 +000071 Popular modules (such as PyWin32) with their respective documentation, tool
Ezio Melotti0639d5a2009-12-19 23:26:38 +000072 suite for building extensible Python applications
Christian Heimesd8654cf2007-12-02 15:22:16 +000073
Christian Heimes255f53b2007-12-08 15:33:56 +000074Notice that these packages are likely to install *older* versions of Python.
75
Christian Heimesd8654cf2007-12-02 15:22:16 +000076
77
78Configuring Python
79==================
80
81In order to run Python flawlessly, you might have to change certain environment
82settings in Windows.
83
84
Brian Curtina86f1852012-08-19 11:22:20 -050085.. _setting-envvars:
86
Christian Heimesd8654cf2007-12-02 15:22:16 +000087Excursus: Setting environment variables
88---------------------------------------
89
Christian Heimes255f53b2007-12-08 15:33:56 +000090Windows has a built-in dialog for changing environment variables (following
Georg Brandl48310cd2009-01-03 21:18:54 +000091guide applies to XP classical view): Right-click the icon for your machine
92(usually located on your Desktop and called "My Computer") and choose
93:menuselection:`Properties` there. Then, open the :guilabel:`Advanced` tab
Christian Heimes255f53b2007-12-08 15:33:56 +000094and click the :guilabel:`Environment Variables` button.
Christian Heimesd8654cf2007-12-02 15:22:16 +000095
96In short, your path is:
97
98 :menuselection:`My Computer
99 --> Properties
100 --> Advanced
101 --> Environment Variables`
102
103In this dialog, you can add or modify User and System variables. To change
104System variables, you need non-restricted access to your machine
105(i.e. Administrator rights).
106
107Another way of adding variables to your environment is using the :command:`set`
108command::
109
110 set PYTHONPATH=%PYTHONPATH%;C:\My_python_lib
111
112To make this setting permanent, you could add the corresponding command line to
Christian Heimes255f53b2007-12-08 15:33:56 +0000113your :file:`autoexec.bat`. :program:`msconfig` is a graphical interface to this
114file.
Christian Heimesd8654cf2007-12-02 15:22:16 +0000115
116Viewing environment variables can also be done more straight-forward: The
117command prompt will expand strings wrapped into percent signs automatically::
118
119 echo %PATH%
120
121Consult :command:`set /?` for details on this behaviour.
122
123.. seealso::
124
125 http://support.microsoft.com/kb/100843
126 Environment variables in Windows NT
127
128 http://support.microsoft.com/kb/310519
129 How To Manage Environment Variables in Windows XP
130
Christian Heimes255f53b2007-12-08 15:33:56 +0000131 http://www.chem.gla.ac.uk/~louis/software/faq/q1.html
132 Setting Environment variables, Louis J. Farrugia
133
Christian Heimesd8654cf2007-12-02 15:22:16 +0000134
Nick Coghlan349c8022012-09-30 13:00:43 +0530135.. _windows-path-mod:
136
Christian Heimesd8654cf2007-12-02 15:22:16 +0000137Finding the Python executable
138-----------------------------
139
Brian Curtina86f1852012-08-19 11:22:20 -0500140.. versionchanged:: 3.3
141
Christian Heimesd8654cf2007-12-02 15:22:16 +0000142Besides using the automatically created start menu entry for the Python
Brian Curtina86f1852012-08-19 11:22:20 -0500143interpreter, you might want to start Python in the command prompt. As of
144Python 3.3, the installer has an option to set that up for you.
Christian Heimesd8654cf2007-12-02 15:22:16 +0000145
Brian Curtina86f1852012-08-19 11:22:20 -0500146At the "Customize Python 3.3" screen, an option called
147"Add python.exe to search path" can be enabled to have the installer place
148your installation into the :envvar:`%PATH%`. This allows you to type
149:command:`python` to run the interpreter. Thus, you can also execute your
150scripts with command line options, see :ref:`using-on-cmdline` documentation.
Christian Heimesd8654cf2007-12-02 15:22:16 +0000151
Brian Curtina86f1852012-08-19 11:22:20 -0500152If you don't enable this option at install time, you can always re-run the
153installer to choose it.
154
155The alternative is manually modifying the :envvar:`%PATH%` using the
156directions in :ref:`setting-envvars`. You need to set your :envvar:`%PATH%`
157environment variable to include the directory of your Python distribution,
158delimited by a semicolon from other entries. An example variable could look
159like this (assuming the first two entries are Windows' default)::
160
161 C:\WINDOWS\system32;C:\WINDOWS;C:\Python33
Christian Heimesd8654cf2007-12-02 15:22:16 +0000162
163
164Finding modules
165---------------
166
167Python usually stores its library (and thereby your site-packages folder) in the
168installation directory. So, if you had installed Python to
169:file:`C:\\Python\\`, the default library would reside in
170:file:`C:\\Python\\Lib\\` and third-party modules should be stored in
171:file:`C:\\Python\\Lib\\site-packages\\`.
172
Georg Brandl7306ad52010-10-17 10:05:13 +0000173This is how :data:`sys.path` is populated on Windows:
Christian Heimesd8654cf2007-12-02 15:22:16 +0000174
Georg Brandl7306ad52010-10-17 10:05:13 +0000175* An empty entry is added at the start, which corresponds to the current
176 directory.
Christian Heimesd8654cf2007-12-02 15:22:16 +0000177
Georg Brandl7306ad52010-10-17 10:05:13 +0000178* If the environment variable :envvar:`PYTHONPATH` exists, as described in
179 :ref:`using-on-envvars`, its entries are added next. Note that on Windows,
180 paths in this variable must be separated by semicolons, to distinguish them
181 from the colon used in drive identifiers (``C:\`` etc.).
Christian Heimesd8654cf2007-12-02 15:22:16 +0000182
Georg Brandl7306ad52010-10-17 10:05:13 +0000183* Additional "application paths" can be added in the registry as subkeys of
184 :samp:`\\SOFTWARE\\Python\\PythonCore\\{version}\\PythonPath` under both the
185 ``HKEY_CURRENT_USER`` and ``HKEY_LOCAL_MACHINE`` hives. Subkeys which have
186 semicolon-delimited path strings as their default value will cause each path
187 to be added to :data:`sys.path`. (Note that all known installers only use
188 HKLM, so HKCU is typically empty.)
189
190* If the environment variable :envvar:`PYTHONHOME` is set, it is assumed as
191 "Python Home". Otherwise, the path of the main Python executable is used to
192 locate a "landmark file" (``Lib\os.py``) to deduce the "Python Home". If a
193 Python home is found, the relevant sub-directories added to :data:`sys.path`
194 (``Lib``, ``plat-win``, etc) are based on that folder. Otherwise, the core
195 Python path is constructed from the PythonPath stored in the registry.
196
197* If the Python Home cannot be located, no :envvar:`PYTHONPATH` is specified in
198 the environment, and no registry entries can be found, a default path with
199 relative entries is used (e.g. ``.\Lib;.\plat-win``, etc).
200
201The end result of all this is:
202
203* When running :file:`python.exe`, or any other .exe in the main Python
204 directory (either an installed version, or directly from the PCbuild
205 directory), the core path is deduced, and the core paths in the registry are
206 ignored. Other "application paths" in the registry are always read.
207
208* When Python is hosted in another .exe (different directory, embedded via COM,
209 etc), the "Python Home" will not be deduced, so the core path from the
210 registry is used. Other "application paths" in the registry are always read.
211
212* If Python can't find its home and there is no registry (eg, frozen .exe, some
213 very strange installation setup) you get a path with some default, but
214 relative, paths.
Christian Heimesd8654cf2007-12-02 15:22:16 +0000215
216
217Executing scripts
218-----------------
219
Vinay Sajipd89dae12012-06-24 11:23:07 +0100220As of Python 3.3, Python includes a launcher which facilitates running Python
221scripts. See :ref:`launcher` for more information.
222
223Executing scripts without the Python launcher
224---------------------------------------------
225
226Without the Python launcher installed, Python scripts (files with the extension
227``.py``) will be executed by :program:`python.exe` by default. This executable
228opens a terminal, which stays open even if the program uses a GUI. If you do
229not want this to happen, use the extension ``.pyw`` which will cause the script
230to be executed by :program:`pythonw.exe` by default (both executables are
231located in the top-level of your Python installation directory). This
232suppresses the terminal window on startup.
Christian Heimesd8654cf2007-12-02 15:22:16 +0000233
234You can also make all ``.py`` scripts execute with :program:`pythonw.exe`,
Georg Brandl2ee470f2008-07-16 12:55:28 +0000235setting this through the usual facilities, for example (might require
Christian Heimes2380ac72008-01-09 00:17:24 +0000236administrative rights):
Christian Heimesd8654cf2007-12-02 15:22:16 +0000237
Christian Heimes2380ac72008-01-09 00:17:24 +0000238#. Launch a command prompt.
239#. Associate the correct file group with ``.py`` scripts::
Georg Brandl48310cd2009-01-03 21:18:54 +0000240
Christian Heimes2380ac72008-01-09 00:17:24 +0000241 assoc .py=Python.File
Christian Heimesd8654cf2007-12-02 15:22:16 +0000242
Christian Heimes2380ac72008-01-09 00:17:24 +0000243#. Redirect all Python files to the new executable::
Georg Brandl48310cd2009-01-03 21:18:54 +0000244
Christian Heimes2380ac72008-01-09 00:17:24 +0000245 ftype Python.File=C:\Path\to\pythonw.exe "%1" %*
Christian Heimesd8654cf2007-12-02 15:22:16 +0000246
247
Vinay Sajipd89dae12012-06-24 11:23:07 +0100248.. _launcher:
249
250Python Launcher for Windows
251===========================
252
253.. versionadded:: 3.3
254
255The Python launcher for Windows is a utility which aids in the location and
256execution of different Python versions. It allows scripts (or the
257command-line) to indicate a preference for a specific Python version, and
258will locate and execute that version.
259
260Getting started
261---------------
262
263From the command-line
264^^^^^^^^^^^^^^^^^^^^^
265
266You should ensure the launcher is on your PATH - depending on how it was
267installed it may already be there, but check just in case it is not.
268
269From a command-prompt, execute the following command:
270
271::
272
273 py
274
275You should find that the latest version of Python 2.x you have installed is
276started - it can be exited as normal, and any additional command-line
277arguments specified will be sent directly to Python.
278
279If you have multiple versions of Python 2.x installed (e.g., 2.6 and 2.7) you
280will have noticed that Python 2.7 was started - to launch Python 2.6, try the
281command:
282
283::
284
285 py -2.6
286
287If you have a Python 3.x installed, try the command:
288
289::
290
291 py -3
292
293You should find the latest version of Python 3.x starts.
294
295From a script
296^^^^^^^^^^^^^
297
298Let's create a test Python script - create a file called ``hello.py`` with the
299following contents
300
301::
302
303 #! python
304 import sys
305 sys.stdout.write("hello from Python %s\n" % (sys.version,))
306
307From the directory in which hello.py lives, execute the command:
308
309::
310
311 py hello.py
312
313You should notice the version number of your latest Python 2.x installation
314is printed. Now try changing the first line to be:
315
316::
317
318 #! python3
319
320Re-executing the command should now print the latest Python 3.x information.
321As with the above command-line examples, you can specify a more explicit
322version qualifier. Assuming you have Python 2.6 installed, try changing the
323first line to ``#! python2.6`` and you should find the 2.6 version
324information printed.
325
326From file associations
327^^^^^^^^^^^^^^^^^^^^^^
328
329The launcher should have been associated with Python files (i.e. ``.py``,
330``.pyw``, ``.pyc``, ``.pyo`` files) when it was installed. This means that
331when you double-click on one of these files from Windows explorer the launcher
332will be used, and therefore you can use the same facilities described above to
333have the script specify the version which should be used.
334
335The key benefit of this is that a single launcher can support multiple Python
336versions at the same time depending on the contents of the first line.
337
338Shebang Lines
339-------------
340
341If the first line of a script file starts with ``#!``, it is known as a
342"shebang" line. Linux and other Unix like operating systems have native
343support for such lines and are commonly used on such systems to indicate how
344a script should be executed. This launcher allows the same facilities to be
345using with Python scripts on Windows and the examples above demonstrate their
346use.
347
348To allow shebang lines in Python scripts to be portable between Unix and
349Windows, this launcher supports a number of 'virtual' commands to specify
350which interpreter to use. The supported virtual commands are:
351
352* ``/usr/bin/env python``
353* ``/usr/bin/python``
354* ``/usr/local/bin/python``
355* ``python``
356
357For example, if the first line of your script starts with
358
359::
360
361 #! /usr/bin/python
362
363The default Python will be located and used. As many Python scripts written
364to work on Unix will already have this line, you should find these scripts can
365be used by the launcher without modification. If you are writing a new script
366on Windows which you hope will be useful on Unix, you should use one of the
367shebang lines starting with ``/usr``.
368
369Arguments in shebang lines
370--------------------------
371
372The shebang lines can also specify additional options to be passed to the
373Python interpreter. For example, if you have a shebang line:
374
375::
376
377 #! /usr/bin/python -v
378
379Then Python will be started with the ``-v`` option
380
381Customization
382-------------
383
384Customization via INI files
385^^^^^^^^^^^^^^^^^^^^^^^^^^^
386
387 Two .ini files will be searched by the launcher - ``py.ini`` in the
388 current user's "application data" directory (i.e. the directory returned
389 by calling the Windows function SHGetFolderPath with CSIDL_LOCAL_APPDATA)
390 and ``py.ini`` in the same directory as the launcher. The same .ini
391 files are used for both the 'console' version of the launcher (i.e.
392 py.exe) and for the 'windows' version (i.e. pyw.exe)
393
394 Customization specified in the "application directory" will have
395 precedence over the one next to the executable, so a user, who may not
396 have write access to the .ini file next to the launcher, can override
397 commands in that global .ini file)
398
399Customizing default Python versions
400^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
401
402In some cases, a version qualifier can be included in a command to dictate
403which version of Python will be used by the command. A version qualifier
404starts with a major version number and can optionally be followed by a period
405('.') and a minor version specifier. If the minor qualifier is specified, it
406may optionally be followed by "-32" to indicate the 32-bit implementation of
407that version be used.
408
409For example, a shebang line of ``#!python`` has no version qualifier, while
410``#!python3`` has a version qualifier which specifies only a major version.
411
412If no version qualifiers are found in a command, the environment variable
413``PY_PYTHON`` can be set to specify the default version qualifier - the default
414value is "2". Note this value could specify just a major version (e.g. "2") or
415a major.minor qualifier (e.g. "2.6"), or even major.minor-32.
416
417If no minor version qualifiers are found, the environment variable
418``PY_PYTHON{major}`` (where ``{major}`` is the current major version qualifier
419as determined above) can be set to specify the full version. If no such option
420is found, the launcher will enumerate the installed Python versions and use
421the latest minor release found for the major version, which is likely,
422although not guaranteed, to be the most recently installed version in that
423family.
424
425On 64-bit Windows with both 32-bit and 64-bit implementations of the same
426(major.minor) Python version installed, the 64-bit version will always be
427preferred. This will be true for both 32-bit and 64-bit implementations of the
428launcher - a 32-bit launcher will prefer to execute a 64-bit Python installation
429of the specified version if available. This is so the behavior of the launcher
430can be predicted knowing only what versions are installed on the PC and
431without regard to the order in which they were installed (i.e., without knowing
432whether a 32 or 64-bit version of Python and corresponding launcher was
433installed last). As noted above, an optional "-32" suffix can be used on a
434version specifier to change this behaviour.
435
436Examples:
437
438* If no relevant options are set, the commands ``python`` and
439 ``python2`` will use the latest Python 2.x version installed and
440 the command ``python3`` will use the latest Python 3.x installed.
441
442* The commands ``python3.1`` and ``python2.7`` will not consult any
443 options at all as the versions are fully specified.
444
445* If ``PY_PYTHON=3``, the commands ``python`` and ``python3`` will both use
446 the latest installed Python 3 version.
447
448* If ``PY_PYTHON=3.1-32``, the command ``python`` will use the 32-bit
449 implementation of 3.1 whereas the command ``python3`` will use the latest
450 installed Python (PY_PYTHON was not considered at all as a major
451 version was specified.)
452
453* If ``PY_PYTHON=3`` and ``PY_PYTHON3=3.1``, the commands
454 ``python`` and ``python3`` will both use specifically 3.1
455
456In addition to environment variables, the same settings can be configured
457in the .INI file used by the launcher. The section in the INI file is
458called ``[defaults]`` and the key name will be the same as the
Ezio Melotti5b69fbd2012-10-19 20:40:18 +0300459environment variables without the leading ``PY_`` prefix (and note that
Vinay Sajipd89dae12012-06-24 11:23:07 +0100460the key names in the INI file are case insensitive.) The contents of
461an environment variable will override things specified in the INI file.
462
463For example:
464
465* Setting ``PY_PYTHON=3.1`` is equivalent to the INI file containing:
466
467::
468
469 [defaults]
470 python=3.1
471
472* Setting ``PY_PYTHON=3`` and ``PY_PYTHON3=3.1`` is equivalent to the INI file
473 containing:
474
475::
476
477 [defaults]
478 python=3
479 python3=3.1
480
481Diagnostics
482-----------
483
484If an environment variable ``PYLAUNCH_DEBUG`` is set (to any value), the
485launcher will print diagnostic information to stderr (i.e. to the console).
486While this information manages to be simultaneously verbose *and* terse, it
487should allow you to see what versions of Python were located, why a
488particular version was chosen and the exact command-line used to execute the
489target Python.
490
491
Christian Heimesd8654cf2007-12-02 15:22:16 +0000492Additional modules
493==================
494
495Even though Python aims to be portable among all platforms, there are features
496that are unique to Windows. A couple of modules, both in the standard library
497and external, and snippets exist to use these features.
498
499The Windows-specific standard modules are documented in
500:ref:`mswin-specific-services`.
501
502
503PyWin32
504-------
505
506The `PyWin32 <http://python.net/crew/mhammond/win32/>`_ module by Mark Hammond
507is a collection of modules for advanced Windows-specific support. This includes
Georg Brandl2ee470f2008-07-16 12:55:28 +0000508utilities for:
Christian Heimesd8654cf2007-12-02 15:22:16 +0000509
510* `Component Object Model <http://www.microsoft.com/com/>`_ (COM)
511* Win32 API calls
512* Registry
513* Event log
Georg Brandl495f7b52009-10-27 15:28:25 +0000514* `Microsoft Foundation Classes <http://msdn.microsoft.com/en-us/library/fe1cf721%28VS.80%29.aspx>`_ (MFC)
Christian Heimesd8654cf2007-12-02 15:22:16 +0000515 user interfaces
516
517`PythonWin <http://web.archive.org/web/20060524042422/
518http://www.python.org/windows/pythonwin/>`_ is a sample MFC application
519shipped with PyWin32. It is an embeddable IDE with a built-in debugger.
520
521.. seealso::
522
523 `Win32 How Do I...? <http://timgolden.me.uk/python/win32_how_do_i.html>`_
524 by Tim Golden
525
526 `Python and COM <http://www.boddie.org.uk/python/COM.html>`_
527 by David and Paul Boddie
528
529
530Py2exe
531------
532
533`Py2exe <http://www.py2exe.org/>`_ is a :mod:`distutils` extension (see
534:ref:`extending-distutils`) which wraps Python scripts into executable Windows
535programs (:file:`{*}.exe` files). When you have done this, you can distribute
536your application without requiring your users to install Python.
537
538
539WConio
540------
541
542Since Python's advanced terminal handling layer, :mod:`curses`, is restricted to
543Unix-like systems, there is a library exclusive to Windows as well: Windows
544Console I/O for Python.
545
546`WConio <http://newcenturycomputers.net/projects/wconio.html>`_ is a wrapper for
547Turbo-C's :file:`CONIO.H`, used to create text user interfaces.
548
549
550
551Compiling Python on Windows
552===========================
553
554If you want to compile CPython yourself, first thing you should do is get the
555`source <http://python.org/download/source/>`_. You can download either the
556latest release's source or just grab a fresh `checkout
Éric Araujo9be57232011-10-14 17:37:45 +0200557<http://docs.python.org/devguide/setup#checking-out-the-code>`_.
Christian Heimesd8654cf2007-12-02 15:22:16 +0000558
559For Microsoft Visual C++, which is the compiler with which official Python
560releases are built, the source tree contains solutions/project files. View the
561:file:`readme.txt` in their respective directories:
562
563+--------------------+--------------+-----------------------+
564| Directory | MSVC version | Visual Studio version |
565+====================+==============+=======================+
Christian Heimes2c181612007-12-17 20:04:13 +0000566| :file:`PC/VC6/` | 6.0 | 97 |
Christian Heimesd8654cf2007-12-02 15:22:16 +0000567+--------------------+--------------+-----------------------+
Benjamin Peterson9bc93512008-09-22 22:10:59 +0000568| :file:`PC/VS7.1/` | 7.1 | 2003 |
Christian Heimesd8654cf2007-12-02 15:22:16 +0000569+--------------------+--------------+-----------------------+
Benjamin Peterson9bc93512008-09-22 22:10:59 +0000570| :file:`PC/VS8.0/` | 8.0 | 2005 |
Christian Heimesd8654cf2007-12-02 15:22:16 +0000571+--------------------+--------------+-----------------------+
Benjamin Peterson9bc93512008-09-22 22:10:59 +0000572| :file:`PCbuild/` | 9.0 | 2008 |
Christian Heimesd8654cf2007-12-02 15:22:16 +0000573+--------------------+--------------+-----------------------+
574
575Note that not all of these build directories are fully supported. Read the
576release notes to see which compiler version the official releases for your
577version are built with.
578
579Check :file:`PC/readme.txt` for general information on the build process.
580
581
582For extension modules, consult :ref:`building-on-windows`.
583
584.. seealso::
585
586 `Python + Windows + distutils + SWIG + gcc MinGW <http://sebsauvage.net/python/mingw.html>`_
587 or "Creating Python extensions in C/C++ with SWIG and compiling them with
588 MinGW gcc under Windows" or "Installing Python extension with distutils
589 and without Microsoft Visual C++" by Sébastien Sauvage, 2003
590
Georg Brandl495f7b52009-10-27 15:28:25 +0000591 `MingW -- Python extensions <http://oldwiki.mingw.org/index.php/Python%20extensions>`_
Christian Heimesd8654cf2007-12-02 15:22:16 +0000592 by Trent Apted et al, 2007
593
594
595Other resources
596===============
597
598.. seealso::
599
600 `Python Programming On Win32 <http://www.oreilly.com/catalog/pythonwin32/>`_
601 "Help for Windows Programmers"
602 by Mark Hammond and Andy Robinson, O'Reilly Media, 2000,
603 ISBN 1-56592-621-8
604
605 `A Python for Windows Tutorial <http://www.imladris.com/Scripts/PythonForWindows.html>`_
606 by Amanda Birmingham, 2004
607
Vinay Sajipd89dae12012-06-24 11:23:07 +0100608 :pep:`397` - Python launcher for Windows
609 The proposal for the launcher to be included in the Python distribution.
610
611