mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Get rid of a bunch more raw_input references
This commit is contained in:
parent
9e2b9665ae
commit
ce96f69d69
42 changed files with 222 additions and 144 deletions
|
@ -768,10 +768,11 @@ class FancyURLopener(URLopener):
|
|||
|
||||
def prompt_user_passwd(self, host, realm):
|
||||
"""Override this in a GUI environment!"""
|
||||
import getpass
|
||||
import getpass, sys
|
||||
try:
|
||||
user = raw_input("Enter username for %s at %s: " % (realm,
|
||||
host))
|
||||
sys.stdout.write("Enter username for %s at %s: " % (realm, host))
|
||||
sys.stdout.flush()
|
||||
user = sys.stdin.readline()
|
||||
passwd = getpass.getpass("Enter password for %s in %s at %s: " %
|
||||
(user, realm, host))
|
||||
return user, passwd
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue