71 fd = sys.stdin.fileno()
77 old = termios.tcgetattr(fd)
78 if old[3] & termios.ECHO:
80 new = termios.tcgetattr(fd)
81 new[3] = new[3] & ~termios.ECHO
83 termios.tcsetattr(fd, termios.TCSADRAIN, new)
86 banner=
"Python Interactive Interpreter. To exit, type 'quit()', 'exit()'.",
87 readfunc=readfunc_stdio,
91 termios.tcsetattr(fd, termios.TCSADRAIN, old)
97 banner=
"Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.",
98 readfunc=readfunc_stdio,
104 banner=
"Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.",
110 except SystemExit
as e:
112 print(
"Script exited with code %s" % e.code)