summaryrefslogtreecommitdiff
path: root/Doc/library/sysconfig.rst
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2010-05-25 09:44:36 +0000
committerTarek Ziadé <ziade.tarek@gmail.com>2010-05-25 09:44:36 +0000
commit074ee767b9d62e35c121c8f1e008813169ab8e22 (patch)
treeacbcd118aaf8858038f6a0ae34dc5b5b4ffff411 /Doc/library/sysconfig.rst
parent1aebbb11c3463d94005aa3d9509c3ce4918a9aa3 (diff)
downloadcpython-074ee767b9d62e35c121c8f1e008813169ab8e22.tar.gz
Made sysconfig a script that displays useful information - #8770
Diffstat (limited to 'Doc/library/sysconfig.rst')
-rw-r--r--Doc/library/sysconfig.rst32
1 files changed, 32 insertions, 0 deletions
diff --git a/Doc/library/sysconfig.rst b/Doc/library/sysconfig.rst
index 24264364c3..0a7e3de17b 100644
--- a/Doc/library/sysconfig.rst
+++ b/Doc/library/sysconfig.rst
@@ -216,3 +216,35 @@ Other functions
.. function:: get_config_h_filename()
Return the path of :file:`pyconfig.h`.
+
+Using :mod:`sysconfig` as a script
+----------------------------------
+
+You can use :mod:`sysconfig` as a script with Python's *-m* option::
+
+ $ python -m sysconfig
+ Platform: "macosx-10.4-i386"
+ Python version: "3.2"
+ Current installation scheme: "posix_prefix"
+
+ Paths:
+ data = "/usr/local"
+ include = "/Users/tarek/Dev/svn.python.org/py3k/Include"
+ platinclude = "."
+ platlib = "/usr/local/lib/python3.2/site-packages"
+ platstdlib = "/usr/local/lib/python3.2"
+ purelib = "/usr/local/lib/python3.2/site-packages"
+ scripts = "/usr/local/bin"
+ stdlib = "/usr/local/lib/python3.2"
+
+ Variables:
+ AC_APPLE_UNIVERSAL_BUILD = "0"
+ AIX_GENUINE_CPLUSPLUS = "0"
+ AR = "ar"
+ ARFLAGS = "rc"
+ ASDLGEN = "./Parser/asdl_c.py"
+ ...
+
+This call will print in the standard output the information returned by
+:func:`get_platform`, :func:`get_python_version`, :func:`get_path` and
+:func:`get_config_vars`.