summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-02-27 21:23:31 (GMT)
committerFred Drake <fdrake@acm.org>2001-02-27 21:23:31 (GMT)
commit1191d0148fc971cd8516b80f58b42910af88cd54 (patch)
treefd8cd60610a2c0a4fcacc6b686d4ac3514f4693f
parentdf48d14f440f6ca2e3981b0eb963bb5da0096589 (diff)
downloadcpython-1191d0148fc971cd8516b80f58b42910af88cd54.zip
cpython-1191d0148fc971cd8516b80f58b42910af88cd54.tar.gz
cpython-1191d0148fc971cd8516b80f58b42910af88cd54.tar.bz2
Get the needed constants from termios, not TERMIOS.
-rw-r--r--Lib/getpass.py8
-rw-r--r--Lib/tty.py1
2 files changed, 4 insertions, 5 deletions
diff --git a/Lib/getpass.py b/Lib/getpass.py
index 840f7a0..2b1f6b2 100644
--- a/Lib/getpass.py
+++ b/Lib/getpass.py
@@ -30,12 +30,12 @@ def unix_getpass(prompt='Password: '):
old = termios.tcgetattr(fd) # a copy to save
new = old[:]
- new[3] = new[3] & ~TERMIOS.ECHO # 3 == 'lflags'
+ new[3] = new[3] & ~termios.ECHO # 3 == 'lflags'
try:
- termios.tcsetattr(fd, TERMIOS.TCSADRAIN, new)
+ termios.tcsetattr(fd, termios.TCSADRAIN, new)
passwd = _raw_input(prompt)
finally:
- termios.tcsetattr(fd, TERMIOS.TCSADRAIN, old)
+ termios.tcsetattr(fd, termios.TCSADRAIN, old)
sys.stdout.write('\n')
return passwd
@@ -103,7 +103,7 @@ def getuser():
# Bind the name getpass to the appropriate function
try:
- import termios, TERMIOS
+ import termios
except ImportError:
try:
import msvcrt
diff --git a/Lib/tty.py b/Lib/tty.py
index b76a617..b1904fb 100644
--- a/Lib/tty.py
+++ b/Lib/tty.py
@@ -2,7 +2,6 @@
# Author: Steen Lumholt.
-from TERMIOS import *
from termios import *
# Indexes for termios list.