Package dbus :: Class ByteArray
[hide private]
[frames] | no frames]

Class ByteArray

source code

     object --+            
              |            
     basestring --+        
                  |        
                str --+    
                      |    
_dbus_bindings._StrBase --+
                          |
                         ByteArray

ByteArray is a subtype of str which can be used when you want an efficient immutable representation of a D-Bus byte array (signature 'ay').

By default, when byte arrays are converted from D-Bus to Python, they come out as a dbus.Array of dbus.Byte. This is just for symmetry with the other D-Bus types - in practice, what you usually want is the byte array represented as a string, using this class. To get this, pass the byte_arrays=True keyword argument to any of these methods:

Import via:

from dbus import ByteArray

Constructor:

ByteArray(str)


Instance Methods [hide private]

Inherited from _dbus_bindings._StrBase: __delattr__, __getattribute__, __new__, __repr__, __setattr__

Inherited from str: __add__, __contains__, __eq__, __ge__, __getitem__, __getnewargs__, __getslice__, __gt__, __hash__, __le__, __len__, __lt__, __mod__, __mul__, __ne__, __rmod__, __rmul__, __str__, capitalize, center, count, decode, encode, endswith, expandtabs, find, index, isalnum, isalpha, isdigit, islower, isspace, istitle, isupper, join, ljust, lower, lstrip, partition, replace, rfind, rindex, rjust, rpartition, rsplit, rstrip, split, splitlines, startswith, strip, swapcase, title, translate, upper, zfill

Inherited from object: __init__, __reduce__, __reduce_ex__

Properties [hide private]

Inherited from object: __class__