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
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)
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: