LightBlog
Contact at mumbai.academics@gmail.com or 8097636691/9323040215
Responsive Ads Here

Wednesday, 13 June 2018

Python New module: sysconfig

The sysconfig module has been pulled out of the Distutils package, becoming a new top-level module in its own right. sysconfig provides functions for getting information about Python’s build process: compiler switches, installation paths, the platform name, and whether Python is running from its source directory.
Some of the functions in the module are:
  • get_config_var() returns variables from Python’s Makefile and the pyconfig.h file.
  • get_config_vars() returns a dictionary containing all of the configuration variables.
  • get_path() returns the configured path for a particular type of module: the standard library, site-specific modules, platform-specific modules, etc.
  • is_python_build() returns true if you’re running a binary from a Python source tree, and false otherwise.
Consult the sysconfig documentation for more details and for a complete list of functions.
The Distutils package and sysconfig are now maintained by Tarek Ziadé, who has also started a Distutils2 package (source repository athttps://hg.python.org/distutils2/) for developing a next-generation version of Distutils.