Changeset 432
- Timestamp:
- 05/22/07 23:13:32 (2 years ago)
- Files:
-
- cly/trunk/cly/console.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cly/trunk/cly/console.py
r425 r432 73 73 74 74 fd = sys.stdin.fileno() 75 old_settings = termios.tcgetattr(fd)76 75 try: 77 tty.setraw(sys.stdin.fileno()) 78 ch = sys.stdin.read(1) 76 old_settings = termios.tcgetattr(fd) 77 except termios.error: 78 return os.read(fd, 1) 79 try: 80 tty.setraw(fd) 81 ch = os.read(fd, 1) 79 82 finally: 80 83 termios.tcsetattr(fd, termios.TCSADRAIN, old_settings) … … 365 368 """Print a list of lists as a table, so that columns line up nicely. 366 369 367 368 369 370 ``header``: list of column headings 370 371 Will be printed as the first row.
