[Python-3000-checkins] r59451 - in python/branches/py3k: Lib/getpass.py Misc/NEWS

christian.heimes python-3000-checkins at python.org
Mon Dec 10 18:02:01 CET 2007


Author: christian.heimes
Date: Mon Dec 10 18:02:00 2007
New Revision: 59451

Modified:
   python/branches/py3k/Lib/getpass.py
   python/branches/py3k/Misc/NEWS
Log:
Fixed #1578: Problems in win_getpass

Modified: python/branches/py3k/Lib/getpass.py
==============================================================================
--- python/branches/py3k/Lib/getpass.py	(original)
+++ python/branches/py3k/Lib/getpass.py	Mon Dec 10 18:02:00 2007
@@ -49,10 +49,10 @@
         return default_getpass(prompt, stream)
     import msvcrt
     for c in prompt:
-        msvcrt.putch(c)
+        msvcrt.putwch(c)
     pw = ""
     while 1:
-        c = msvcrt.getch()
+        c = msvcrt.getwch()
         if c == '\r' or c == '\n':
             break
         if c == '\003':
@@ -61,8 +61,8 @@
             pw = pw[:-1]
         else:
             pw = pw + c
-    msvcrt.putch('\r')
-    msvcrt.putch('\n')
+    msvcrt.putwch('\r')
+    msvcrt.putwch('\n')
     return pw
 
 

Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS	(original)
+++ python/branches/py3k/Misc/NEWS	Mon Dec 10 18:02:00 2007
@@ -25,6 +25,8 @@
 Library
 -------
 
+- Issue #1578: Problems in win_getpass
+
 
 What's New in Python 3.0a2?
 ===========================


More information about the Python-3000-checkins mailing list