Macintosh compatibility.

This commit is contained in:
Ka-Ping Yee 2001-02-27 23:36:29 +00:00
parent 5e2b173333
commit 457aab237f

View file

@ -849,7 +849,7 @@ def ttypager(text):
old = tty.tcgetattr(fd)
tty.setcbreak(fd)
getchar = lambda: sys.stdin.read(1)
except ImportError:
except (ImportError, AttributeError):
tty = None
getchar = lambda: sys.stdin.readline()[:-1][:1]