Long int to int

Tim Howarth tim at worthy.demon.co.uk
Mon Feb 11 08:20:15 EST 2002


In message <mailman.1013426479.20868.python-list at python.org>
          Gerhard Häring <gh_pythonlist at gmx.de> wrote:

> Le 11/02/02 à 10:40, Tim Howarth écrivit:
> > I need to convert some long int values to normal ints.
> > (4 byte words) [...]
> 
> >  |im    ---- ARM Powered ----
> 
> Assuming 32-bit hardware, like my Intel x86 and StrongARM processors :-)

Testing/writing done on StrongARM RiscPC/RISCOS 4, but final to be able
to run on anything. (I'm playing with zipfile module to give RISC OS
filetype support.)

>
>     print struct.unpack("i", struct.pack("I", 0x81234567L))[0]

All I want is a=b ! but lose longness of b !


-- 
___
 |im    ---- ARM Powered ----



More information about the Python-list mailing list