summaryrefslogtreecommitdiffstats
path: root/Doc/library/termios.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/termios.rst')
-rw-r--r--Doc/library/termios.rst8
1 files changed, 1 insertions, 7 deletions
diff --git a/Doc/library/termios.rst b/Doc/library/termios.rst
index 695faad..54fb065 100644
--- a/Doc/library/termios.rst
+++ b/Doc/library/termios.rst
@@ -90,12 +90,6 @@ technique using a separate :func:`tcgetattr` call and a :keyword:`try` ...
:keyword:`finally` statement to ensure that the old tty attributes are restored
exactly no matter what happens::
- def raw_input(prompt):
- import sys
- sys.stdout.write(prompt)
- sys.stdout.flush()
- return sys.stdin.readline()
-
def getpass(prompt = "Password: "):
import termios, sys
fd = sys.stdin.fileno()
@@ -104,7 +98,7 @@ exactly no matter what happens::
new[3] = new[3] & ~termios.ECHO # lflags
try:
termios.tcsetattr(fd, termios.TCSADRAIN, new)
- passwd = raw_input(prompt)
+ passwd = input(prompt)
finally:
termios.tcsetattr(fd, termios.TCSADRAIN, old)
return passwd