Finding out if a python binary has been compiled with or without pymalloc
gh_pythonlist at gmx.de
Tue Dec 11 15:56:33 CET 2001
Le 11/12/01 à 03:16, Rémi Delon écrivit:
> I'd like to know if there is a way to find out if a python binary
> distribution has been compiled with or without pymalloc.
> My website hosting machine has python2.1 installed on it, but I
> don't know where this distribution comes from. I only have access to
> the python2.1 binary, and I'd like to check if it uses pymalloc
> or not.
My try would be:
from distutils import sysconfig
return sysconfig.get_config_var("CONFIG_ARGS").find("pymalloc") >= 0
As you might have guessed, you can find out lots of other useful info
with the get_config_vars() and get_config_var() functions.
mail: gerhard <at> bigfoot <dot> de registered Linux user #64239
web: http://www.cs.fhm.edu/~ifw00065/ OpenPGP public key id 86AB43C0
public key fingerprint: DEC1 1D02 5743 1159 CD20 A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))
More information about the Python-list