You can compile Python in various ways. I\'d like to find out with which options my Python was compiled.
Concrete use-case: was my Python compiled with readline? I k
Here is a command that i use to compare different python configurations. It includes getting the value of the outputs:
$ python3.6 -c "import sysconfig;print('{}'.format('\n'.join(['{} = {}'.format(v, sysconfig.get_config_var(v)) for v in sorted(sysconfig.get_config_vars(), key=lambda s: s.lower())])))" > /tmp/python36.conf
$ python2.7 -c "import sysconfig;print('{}'.format('\n'.join(['{} = {}'.format(v, sysconfig.get_config_var(v)) for v in sorted(sysconfig.get_config_vars(), key=lambda s: s.lower())])))" > /tmp/python27.conf
$ sdiff /tmp/python36.conf /tmp/python27.conf
$ # This is my own version of colorized side-by-side diff from
$ # https://github.com/jlinoff/csdiff
$ csdiff /tmp/python36.conf /tmp/python27.conf