except ImportError:
class Pager(BasePager):
def __init__(self):
- self.pipe = Popen(pager, shell=True, stdin=PIPE)
+ self.stdout = os.popen(pager, 'w')
+ else:
+ class Pager(BasePager):
+ def __init__(self):
+ self.pipe = Popen(pager, shell=True, stdin=PIPE,
+ universal_newlines=True)
self.stdout = self.pipe.stdin
def close(self):
BasePager.close(self)
self.pipe.wait()
- else:
- class Pager(BasePager):
- def __init__(self):
- self.stdout = os.popen(pager, 'w')
def displayhook(value):
if value is not None: