From d231cd8dc64ab6040032957ef287519fa5247a42 Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Wed, 20 Oct 2010 02:27:39 +0200 Subject: play: allow printing of non-ASCII bytes --- play | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/play b/play index 4305fcf..6626252 100644 --- a/play +++ b/play @@ -120,10 +120,6 @@ class Keymap: class Window: chars = string.letters+string.digits+string.punctuation+string.whitespace - t = ['?'] * 256 - for c in chars: t[ord(c)] = c - translationTable = string.join(t, ""); del t - def __init__(self, parent): self.parent = parent self.children = [] @@ -220,7 +216,7 @@ class StatusWindow(Window): return curses.newwin(1, self.parent.cols-12, self.parent.rows-1, 0) def update(self): - msg = string.translate(self.current_message, Window.translationTable) + msg = self.current_message self.move(0, 0) self.clrtoeol() # Color of statusbar messages @@ -446,7 +442,7 @@ class ListWindow(Window): return "%-*s %s" % (width, cut(self.name+data, width), pos) def putstr(self, entry, *pos): - s = string.translate(str(entry), Window.translationTable) + s = str(entry) pos and self.move(*pos) if self.hoffset: s = "<%s" % s[self.hoffset+1:] self.insstr(cut(s, self.cols)) -- cgit v1.2.3