[Distutils] wordlength etc

M.-A. Lemburg mal at lemburg.com
Mon Jun 30 23:14:56 EDT 2003


Jeremy Hylton wrote:
> On Sun, 2003-06-29 at 14:14, M.-A. Lemburg wrote:
> 
>>>So we assume struct units are 8 bits and then use calcsize("i")*8 as the
>>>wordlength.
>>
>>sizeofint = len(struct.pack('i',1))
> 
> Why not
> 
> sizeofint = struct.calcsize("i")
> 
> ?

Even better :-)

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Software directly from the Source  (#1, Jun 30 2003)
 >>> Python/Zope Products & Consulting ...         http://www.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________




More information about the Distutils-SIG mailing list