| 1234567891011121314151617 |
- import sys
- import select
- import tty
- import termios
- import os
- print "#> ",
- os.system("stty cbreak -echo")
- cmdstring = ''
- while True:
- #print '---'
- a = sys.stdin.read(1)
- cmdstring = cmdstring + a
- sys.stdout.write(cmdstring)
- sys.stdout.write('\r')
- sys.stdout.flush()
- os.system("stty -cbreak echo")
|