gethostbyname blocking

Christian Heimes lists at cheimes.de
Wed Apr 22 20:50:51 CEST 2009


Jean-Paul Calderone wrote:
> I'm not sure what the easiest way to determine whether Python has found
> gethostbyname_r or not on your system is.  The configure script used to
> build Python will probably tell, but I doubt you have that lying around.
> You could just assume this is the case, since you're observing behavior
> consistent with it. ;)

This works on every Unix-like system:

>>> import distutils.sysconfig
>>> distutils.sysconfig.get_config_var("HAVE_GETHOSTBYNAME_R")
1

Christian




More information about the Python-list mailing list