From: Oleg Broytman Date: Mon, 25 Jul 2016 20:40:59 +0000 (+0300) Subject: lib/python/init.py: rename pager.stdin to stdout X-Git-Url: https://git.phdru.name/?p=dotfiles.git;a=commitdiff_plain;h=22bd70edb3ca2408153a5b31c1bd58a721ede1fa lib/python/init.py: rename pager.stdin to stdout --- diff --git a/lib/python/init.py b/lib/python/init.py index 4b8192f..0e33d09 100644 --- a/lib/python/init.py +++ b/lib/python/init.py @@ -135,15 +135,15 @@ def init(): class BasePager: def write(self, value): - self.stdin.write(value) + self.stdout.write(value) def pprint(self, value): pprint(value, - stream=ColoredFile(self.stdin, + stream=ColoredFile(self.stdout, '\033[1;3%sm' % stdout_color)) def close(self): - self.stdin.close() + self.stdout.close() try: from subprocess import Popen, PIPE @@ -151,7 +151,7 @@ def init(): class Pager(BasePager): def __init__(self): self.pipe = Popen(pager, shell=True, stdin=PIPE) - self.stdin = self.pipe.stdin + self.stdout = self.pipe.stdin def close(self): BasePager.close(self) @@ -159,7 +159,7 @@ def init(): else: class Pager(BasePager): def __init__(self): - self.stdin = os.popen(pager, 'w') + self.stdout = os.popen(pager, 'w') def displayhook(value): if value is not None: