Ejemplo n.º 1
0
 def name(self):
     """
     The name of this atom as unicode string.
     """
     return ensure_unicode_string(xlib.get_atom_name(self.display, self))
Ejemplo n.º 2
0
def test_ensure_unicode_string():
    assert isinstance(util.ensure_unicode_string(b'foo'), unicode)
    assert util.ensure_unicode_string(b'foo') == 'foo'
    s = 'foo'
    assert util.ensure_unicode_string(s) is s
Ejemplo n.º 3
0
 def name(self):
     """
     The name of this atom as unicode string.
     """
     return ensure_unicode_string(xlib.get_atom_name(self.display, self))
Ejemplo n.º 4
0
 def name(self):
     """
     The name of this device as unicode string.
     """
     with self._query_device() as device:
         return ensure_unicode_string(device.contents.name)
Ejemplo n.º 5
0
 def name(self):
     """
     The name of this device as unicode string.
     """
     with self._query_device() as device:
         return ensure_unicode_string(device.contents.name)