how to check compile options

Fredrik Lundh fredrik at pythonware.com
Mon Dec 5 15:59:54 EST 2005


"Michal" <michal at plovarna.cz> wrote:

> how i could check, if my python was compiled with option
> WANT_HUGE_STACK_SIZE=yes (or option CFLAG: -DTHREAD_STACK_SIZE=0x100000)
>
> i have already installed python 2.3.5 on my freebsd 5.4 from ports, but
> i dont remember, if i used this options.

to check Python configuration variables, you can do

>>> from distutils.sysconfig import *
>>> d = parse_config_h(open(get_config_h_filename()))
>>> for k in d:
...    print k, d[k]
...
HAVE_SELECT 1
HAVE_ST_BLOCKS 1
HAVE_GETPEERNAME 1
HAVE_GETC_UNLOCKED 1
...

but I'm not sure THREAD_STACK_SIZE really is a Python configuration variable
(I cannot seem to find any traces of that in the Python sources...)

</F>






More information about the Python-list mailing list