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
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins