How to get directory of Python C library
Diez B. Roggisch
deets at nospam.web.de
Sun Nov 15 14:05:48 EST 2009
arve.knudsen at gmail.com schrieb:
> Hi
>
> I need to link against Python, is there a way to get the path to the
> directory containing Python's C library (e.g., <exec-prefix>/libs on
> Windows)?
Most probably from the registry somehow. In general, try & locate a
python-executable, and make it execute
python -c "import sys; print sys.prefix"
Capture that, and you're done. Depending on the OS, the libs then are
placed in e.g. <prefix>/lib.
Diez
More information about the Python-list
mailing list