]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fixed #1578: Problems in win_getpass
authorChristian Heimes <christian@cheimes.de>
Mon, 10 Dec 2007 17:02:00 +0000 (17:02 +0000)
committerChristian Heimes <christian@cheimes.de>
Mon, 10 Dec 2007 17:02:00 +0000 (17:02 +0000)
Lib/getpass.py
Misc/NEWS

index 02fe527e6b95aa7f788b50e0c710ce48db8045e7..a726189fe1a07baaf19fbe00d067c2135d64eb46 100644 (file)
@@ -49,10 +49,10 @@ def win_getpass(prompt='Password: ', stream=None):
         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 @@ def win_getpass(prompt='Password: ', stream=None):
             pw = pw[:-1]
         else:
             pw = pw + c
-    msvcrt.putch('\r')
-    msvcrt.putch('\n')
+    msvcrt.putwch('\r')
+    msvcrt.putwch('\n')
     return pw
 
 
index bd8a3e79b108d35b9ad81f8ba6d04eb8b29a363c..3e3f0e43ae871f23b938892450761b2aacbcec11 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -25,6 +25,8 @@ Extension Modules
 Library
 -------
 
+- Issue #1578: Problems in win_getpass
+
 
 What's New in Python 3.0a2?
 ===========================