75 fd = sys.stdin.fileno()
81 old = termios.tcgetattr(fd)
82 if old[3] & termios.ECHO:
84 new = termios.tcgetattr(fd)
85 new[3] = new[3] & ~termios.ECHO
87 termios.tcsetattr(fd, termios.TCSADRAIN, new)
90 banner=
"Python Interactive Interpreter. To exit, type 'quit()', 'exit()'.",
91 readfunc=readfunc_stdio,
95 termios.tcsetattr(fd, termios.TCSADRAIN, old)
101 banner=
"Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.",
102 readfunc=readfunc_stdio,
108 banner=
"Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.",
114 except SystemExit
as e:
116 print(
"Script exited with code %s" % e.code)