From: Raymond Hettinger Date: Tue, 7 Dec 2010 01:47:52 +0000 (+0000) Subject: Add entry for the new sysconfig module. X-Git-Tag: v3.2b2~195 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3f9734c0f4f4128ea1c743e4ac03b7f73d676867;p=python Add entry for the new sysconfig module. --- diff --git a/Doc/whatsnew/3.2.rst b/Doc/whatsnew/3.2.rst index 421776b212..5ba8f24245 100644 --- a/Doc/whatsnew/3.2.rst +++ b/Doc/whatsnew/3.2.rst @@ -762,6 +762,65 @@ New, Improved, and Deprecated Modules .. XXX add optimize flags for py_compile/compileall (issue10553) +* The new :mod:`sysconfig` module makes it straight-forward to discover + installation paths and configuration variables which vary across platforms and + installs. + + The module offers access simple access functions for platform and version + information: + + * :func:`~sysconfig.get_platform` returning values like *linux-i586* or + *macosx-10.6-ppc*. + * :func:`~sysconfig.get_python_version` returns a Python version string in + the form, "3.2". + + It also provides access to the paths and variables corresponding to one of + seven named schemes used by :mod:`distutils`. Those include *posix_prefix*, + *posix_home*, *posix_user*, *nt*, *nt_user*, *os2*, *os2_home*: + + * :func:`~sysconfig.get_paths` makes a dictionary containing installation paths + for the current installation scheme. + * :func:`~sysconfig.get_config_vars` returns a dictionary of platform specific + variables. + + There is also a convenient command-line interface:: + + C:\Python32>python -m sysconfig + Platform: "win32" + Python version: "3.2" + Current installation scheme: "nt" + + Paths: + data = "C:\Python32" + include = "C:\Python32\Include" + platinclude = "C:\Python32\Include" + platlib = "C:\Python32\Lib\site-packages" + platstdlib = "C:\Python32\Lib" + purelib = "C:\Python32\Lib\site-packages" + scripts = "C:\Python32\Scripts" + stdlib = "C:\Python32\Lib" + + Variables: + BINDIR = "C:\Python32" + BINLIBDEST = "C:\Python32\Lib" + EXE = ".exe" + INCLUDEPY = "C:\Python32\Include" + LIBDEST = "C:\Python32\Lib" + SO = ".pyd" + VERSION = "32" + abiflags = "" + base = "C:\Python32" + exec_prefix = "C:\Python32" + platbase = "C:\Python32" + prefix = "C:\Python32" + projectbase = "C:\Python32" + py_version = "3.2b1" + py_version_nodot = "32" + py_version_short = "3.2" + srcdir = "C:\Python32" + userbase = "C:\Documents and Settings\Raymond\Application Data\Python" + + Multi-threading ===============