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

Class String

source code

object --+        
         |        
basestring --+    
             |    
       unicode --+
                 |
                String

A string represented using Unicode - a subtype of unicode.

All strings on D-Bus are required to be valid Unicode; in the "wire protocol" they're transported as UTF-8.

By default, when strings are converted from D-Bus to Python, they come out as this class. If you prefer to get UTF-8 strings (as instances of a subtype of str) or you want to avoid the conversion overhead of going from UTF-8 to Python's internal Unicode representation, see the documentation for dbus.UTF8String.

Constructor:

String(value: str or unicode[, variant_level: int]) -> String

variant_level must be non-negative; the default is 0.



Instance Methods [hide private]
 
__delattr__(...)
x.__delattr__('name') <==> del x.name
source code
 
__getattribute__(...)
x.__getattribute__('name') <==> x.name
source code
 
__new__(T, S, ...)
Returns: a new object with type S, a subtype of T
source code
 
__repr__(x)
repr(x)
source code
 
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
source code

Inherited from unicode: __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, isdecimal, isdigit, islower, isnumeric, 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__

Instance Variables [hide private]
int variant_level
Indicates how many nested Variant containers this object is contained in: if a message's wire format has a variant containing a variant containing a string, this is represented in Python by a String or UTF8String with variant_level==2.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__delattr__(...)

source code 
x.__delattr__('name') <==> del x.name
Overrides: object.__delattr__

__getattribute__(...)

source code 
x.__getattribute__('name') <==> x.name
Overrides: unicode.__getattribute__

__new__(T, S, ...)

source code 
Returns:
a new object with type S, a subtype of T

Overrides: unicode.__new__

__repr__(x)
(Representation operator)

source code 
repr(x)
Overrides: unicode.__repr__

__setattr__(...)

source code 
x.__setattr__('name', value) <==> x.name = value
Overrides: object.__setattr__

Instance Variable Details [hide private]

variant_level

Indicates how many nested Variant containers this object is contained in: if a message's wire format has a variant containing a variant containing a string, this is represented in Python by a String or UTF8String with variant_level==2.