From ff32ad65eca2f46a7de1fd4a711f6b2217c9d74e Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 20 Aug 2012 13:17:17 +0200 Subject: tty works, but kms ponies are for some reason not converted --- ponysay | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ponysay b/ponysay index 7eb7c54..9578ddc 100755 --- a/ponysay +++ b/ponysay @@ -367,10 +367,10 @@ class Ponysay(): else: if linuxvt or (env_height is ('yes', 'y', '1')): if env_bottom is ('yes', 'y', '1'): - for line in output[: -lines]: + for line in output.split('\n')[: -lines]: print(line) else: - for line in output[: lines]: + for line in output.split('\n')[: lines]: print(line) else: print(output); @@ -450,7 +450,6 @@ class Ponysay(): palette = env_kms palettefile = env_kms.replace('\033]P', '') - print(palettefile) kmsponies = '/var/cache/ponysay/kmsponies/' + palettefile kmspony = (kmsponies + pony).replace('//', '/') @@ -717,7 +716,7 @@ class Backend(): self.link = {'\\' : '\\', '/' : '/'} if not isthink else {'\\' : 'o', '/' : 'o'} - self.output = None + self.output = '' self.pony = None @@ -874,7 +873,7 @@ class Backend(): ''' - Gets colour code att the currect offest in a buffer + Gets colour code att the currect offset in a buffer ''' def __getcolour(self, input, offset): (i, n) = (offset, len(input)) @@ -953,7 +952,7 @@ class Backend(): if i != n: d = line[i] i += 1 - if d == '\033': + if d == '\033': # TODO this should use self.__getcolour() b[bi] = d bi += 1 b[bi] = line[i] -- cgit