Question: **Environment:**

* Mac OS X 10.8.5
* Apache 2.2.26
* Homebrew Python 3.3.3

**Problem:**

I am trying to install mod\_wsgi but first need to determine if Python was configured and compiled with the '--enable-shared' option. 

**Questions:**

1. How can I determine if Homebrew installed Python with the '--enable-shared' option?
2. If it was not installed, what is the correct way to install it?

Thank you!

Answer: 
From the python repl:

```
import sysconfig
sysconfig.get_config_vars('Py_ENABLE_SHARED')

```
A bit better is to use

```
import sysconfig
sysconfig.get_config_var('Py_ENABLE_SHARED')

```

This returns the integer value 0 or 1 directly.
The plural form is used to get multiple values or a whole dict if no argument is given, see <https://docs.python.org/3/library/sysconfig.html?highlight=get_config_vars#sysconfig.get_config_vars>