[FRPythoneers] 24 bit number

Michael Olson Mike.Olson at fourthought.com
Mon Feb 3 19:20:15 MST 2003


This is just a guess, but numPy might have something you can use.

http://py.vaults.ca/apyllo2.py/93134491

On Monday, February 3, 2003, at 11:24 AM, John M. Purser wrote:

> I'm reading an ISAM database with Python and for most of the files it  
> works
> fine.  However I have 83 fields (out of several thousand total) that  
> are
> (believe it or not) 24 bit integers!  Most are unsigned but a few are
> signed.  I've approached the problem by decoding them as a 16 bit  
> signed or
> unsigned integer and an 8 bit integer using the struct module.  I'll
> multiply the 16 bit nuber by 256 then add it to the 8 bit number and  
> put it
> in MySql as a 32 bit number.
>
> Can anyone think of a better approach?
>
> John Purser
>
>
> _______________________________________________
> This message sent by the FRPythoneers mailing list.
> Unsubscribe: echo unsubscribe |  
> FRPythoneers-request at lists.community.tummy.com
> URL: http://lists.community.tummy.com/mailman/listinfo/frpythoneers
>
------------------------------------------------------------------------ 
-----------------
Mike Olson                                                Principal  
Consultant
mike.olson at fourthought.com                +1 303 583 9900
Fourthought, Inc.                                       
http://Fourthought.com
PO Box 270590,                                       http://4Suite.org
Louisville, CO 80027-5009, USA
XML strategy, XML tools, knowledge management




More information about the FRPythoneers mailing list