mirror of
https://github.com/python/cpython.git
synced 2025-11-25 12:44:13 +00:00
Add entry for the new sysconfig module.
This commit is contained in:
parent
778645a379
commit
3f9734c0f4
1 changed files with 59 additions and 0 deletions
|
|
@ -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
|
||||
===============
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue