[Distutils] wordlength etc
M.-A. Lemburg
mal at lemburg.com
Sun Jun 29 21:14:01 EDT 2003
Robin Becker wrote:
> In article <3EFF188F.3020607 at lemburg.com>, M.-A. Lemburg
> <mal at 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/
________________________________________________________________________
More information about the Distutils-SIG
mailing list