![](https://secure.gravatar.com/avatar/12362ecee4672f1dd2d641ce5b4eca14.jpg?s=120&d=mm&r=g)
June 29, 2003
6: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/