diff options
Diffstat (limited to 'display/pythonxlibintf.py')
-rw-r--r-- | display/pythonxlibintf.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/display/pythonxlibintf.py b/display/pythonxlibintf.py index 04d85bb..846be78 100644 --- a/display/pythonxlibintf.py +++ b/display/pythonxlibintf.py @@ -44,8 +44,8 @@ class Display: self.motionev = None self.dpy.flush() - pixel = "\x00\x00\x80" - hole = "\x01\x01\x01" + pixel = b"\x00\x00\x80" + hole = b"\x01\x01\x01" self.taskbkgnd = self.pixmap(32, 32, ((pixel+hole)*16 + (hole+pixel)*16) * 16, 0x010101) @@ -97,14 +97,14 @@ class Display: maskdata.append(long2string(maskline, scanline)) plane /= 2 - imgdata = ''.join(imgdata) + imgdata = b''.join(imgdata) if colorkey >= 0: - maskdata = ''.join(maskdata) + maskdata = b''.join(maskdata) mask = self.win.create_pixmap(w, h, depth) mask.put_image(self.gc, 0, 0, w, h, X.XYPixmap, depth, 0, maskdata) else: mask = None - imgdata = ''.join(imgdata) + imgdata = b''.join(imgdata) image = self.win.create_pixmap(w, h, depth) image.put_image(self.gc, 0, 0, w, h, X.XYPixmap, depth, 0, imgdata) image.mask = mask @@ -201,4 +201,4 @@ class Display: def long2string(bits, strlen): - return ''.join([chr((bits>>n)&0xFF) for n in range(0, 8*strlen, 8)]) + return b''.join([chr((bits>>n)&0xFF) for n in range(0, 8*strlen, 8)]) |