how to init binary buffer in python
Posted
by ace
on Stack Overflow
See other posts from Stack Overflow
or by ace
Published on 2010-05-25T17:39:17Z
Indexed on
2010/05/25
17:41 UTC
Read the original article
Hit count: 203
so, I read from DB binary field i.e. 'field1' to var Buf1, and then do something like:
unpack_from('I', Buf1, 0)
so, all is ok. but question is how can I ini Buf1 without going to DB? I can get value from DB manually and init my var statically, but how? in DB field 'field1' I see something like '0x7B0500000100000064000000B80100006'. and how can I init valid binary buffer from it?
© Stack Overflow or respective owner