
29 Jun
2003
29 Jun
'03
9:14 p.m.
Robin Becker wrote:
In article 3EFF188F.3020607@lemburg.com, M.-A. Lemburg mal@lemburg.com writes
Robin Becker wrote:
Are there standard ways to determine things like wordlength etc in distutils?
I suppose one can use sys.maxint, but I thought this might be a standard kind of requirement now that we're slipping from 32 to 64 bits.
I'd use the struct module for these things.
So we assume struct units are 8 bits and then use calcsize("i")*8 as the wordlength.
sizeofint = len(struct.pack('i',1))
--
Marc-Andre Lemburg
eGenix.com
Professional Python Software directly from the Source (#1, Jun 29 2003)
>>> Python/Zope Products & Consulting ... http://www.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________