How to get the list of options that Python was compiled with?

There is a module to see the system config

import sysconfig
print(sysconfig.get_config_vars())

It offers an interface to get individual variables as well.

sysconfig.get_config_var('HAVE_LIBREADLINE')

It is also accessible via shell:

python3 -m sysconfig | less

Edit:

before python2.7, you have to use

import distutils.sysconfig
print distutils.sysconfig.get_config_vars()

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)