For reasons unknown to me apport-cli only reads one character.
37 def raw_input_char(self, prompt): 38 '''raw_input, but read only one character''' 39 40 sys.stdout.write(prompt) 41 sys.stdout.write(' ') 42 sys.stdout.flush() 43 44 file = sys.stdin.fileno() 45 saved_attributes = termios.tcgetattr(file) 46 attributes = termios.tcgetattr(file) 47 attributes[3] = attributes[3] & ~(termios.ICANON) 48 attributes[6][termios.VMIN] = 1 49 attributes[6][termios.VTIME] = 0 50 termios.tcsetattr(file, termios.TCSANOW, attributes) 51 52 try: 53 ch = str(sys.stdin.read(1)) 54 finally: 55 termios.tcsetattr(file, termios.TCSANOW, saved_attributes) 56 57 sys.stdout.write('\n') 58 return ch
For reasons unknown to me apport-cli only reads one character.
37 def raw_input_ char(self, prompt): write(prompt) tcgetattr( file) tcgetattr( file) 6][termios. VMIN] = 1 6][termios. VTIME] = 0 tcsetattr( file, termios.TCSANOW, attributes) stdin.read( 1)) tcsetattr( file, termios.TCSANOW, saved_attributes) write(' \n')
38 '''raw_input, but read only one character'''
39
40 sys.stdout.
41 sys.stdout.write(' ')
42 sys.stdout.flush()
43
44 file = sys.stdin.fileno()
45 saved_attributes = termios.
46 attributes = termios.
47 attributes[3] = attributes[3] & ~(termios.ICANON)
48 attributes[
49 attributes[
50 termios.
51
52 try:
53 ch = str(sys.
54 finally:
55 termios.
56
57 sys.stdout.
58 return ch