Python - integer to byte

Posted by quano on Stack Overflow See other posts from Stack Overflow or by quano
Published on 2010-04-01T17:29:22Z Indexed on 2010/04/01 17:33 UTC
Read the original article Hit count: 387

Filed under:
|
|

Say I've got an integer, 13941412, that I wish to separate into bytes (the number is actually a color in the form 0x00bbggrr). How would you do that? In c, you'd cast the number to a BYTE and then shift the bits. How do you cast to byte in Python?

© Stack Overflow or respective owner

Related posts about python

Related posts about byte