Пример #1
0
 def name(self):
     """
     The name of this atom as unicode string.
     """
     return ensure_unicode_string(xlib.get_atom_name(self.display, self))
Пример #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
Пример #3
0
 def name(self):
     """
     The name of this atom as unicode string.
     """
     return ensure_unicode_string(xlib.get_atom_name(self.display, self))
Пример #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)
Пример #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)