[Python-3000-checkins] r54451 - python/branches/p3yk/Lib/urllib.py
guido.van.rossum
python-3000-checkins at python.org
Mon Mar 19 23:24:00 CET 2007
Author: guido.van.rossum
Date: Mon Mar 19 23:23:59 2007
New Revision: 54451
Modified:
python/branches/p3yk/Lib/urllib.py
Log:
Use input() now that it is available.
Modified: python/branches/p3yk/Lib/urllib.py
==============================================================================
--- python/branches/p3yk/Lib/urllib.py (original)
+++ python/branches/p3yk/Lib/urllib.py Mon Mar 19 23:23:59 2007
@@ -768,11 +768,9 @@
def prompt_user_passwd(self, host, realm):
"""Override this in a GUI environment!"""
- import getpass, sys
+ import getpass
try:
- sys.stdout.write("Enter username for %s at %s: " % (realm, host))
- sys.stdout.flush()
- user = sys.stdin.readline()
+ user = input("Enter username for %s at %s: " % (realm, host))
passwd = getpass.getpass("Enter password for %s in %s at %s: " %
(user, realm, host))
return user, passwd
More information about the Python-3000-checkins
mailing list