From 22bd70edb3ca2408153a5b31c1bd58a721ede1fa Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 25 Jul 2016 23:40:59 +0300 Subject: [PATCH] lib/python/init.py: rename pager.stdin to stdout --- lib/python/init.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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: -- 2.39.5