Byte-Array to String

Robert Rawlins - Think Blue robert.rawlins at thinkbluemedia.co.uk
Thu Apr 19 10:32:23 EDT 2007


Hello Guys,

 

I have a byte array passed to me by dbus and I'm looking to convert it into
a string? Is that possible? Sorry for seeming like a putts with these
questions, I'm not used to all these complex data types :-D

 

The byte array looks something like this when printed to screen.

 

dbus.Array([dbus.Byte(54), dbus.Byte(0), dbus.Byte(24), dbus.Byte(9),
dbus.Byte(0), dbus.Byte(0), dbus.Byte(10), dbus.Byte(0), dbu
s.Byte(0), dbus.Byte(0), dbus.Byte(0), dbus.Byte(9), dbus.Byte(0),
dbus.Byte(1), dbus.Byte(53), dbus.Byte(3), dbus.Byte(25), dbus.
Byte(16), dbus.Byte(0), dbus.Byte(9), dbus.Byte(2), dbus.Byte(0),
dbus.Byte(53), dbus.Byte(3), dbus.Byte(9), dbus.Byte(1), dbus.By
te(1)], signature=dbus.Signature('y'))

 

Thanks again,

 

Rob

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070419/3702681a/attachment.html>


More information about the Python-list mailing list