]> git.phdru.name Git - dotfiles.git/commitdiff
lib/python/init.py: rename pager.stdin to stdout
authorOleg Broytman <phd@phdru.name>
Mon, 25 Jul 2016 20:40:59 +0000 (23:40 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 25 Jul 2016 20:40:59 +0000 (23:40 +0300)
lib/python/init.py

index 4b8192fba9dfa828ec594955f9046d3b9750f4bd..0e33d094ffd5ed895d3ab29214d9ed7002e3bbb5 100644 (file)
@@ -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: