fix the terminal width detection, Issue 1101

This commit is contained in:
Thomas Nagy 2012-04-09 23:34:23 +02:00
parent 5448e23e40
commit 64c38485c0
1 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,7 @@ else:
class sync_stream(object):
def __init__(self, stream):
self.stream = stream
self.encoding = self.stream.encoding
def write(self, txt):
try:
@ -27,6 +28,9 @@ else:
finally:
wlock.release()
def fileno(self):
return self.stream.fileno()
def flush(self):
self.stream.flush()