summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-12-10 17:02:00 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-12-10 17:02:00 (GMT)
commit0ec88b33d093db00ec68b220247681354a650f0c (patch)
tree784fcb5752a5325cec7cba6bd0ee6b3ebb657d9c
parent2f1019e7521b13fb127f53444b3ebe7116d12037 (diff)
downloadcpython-0ec88b33d093db00ec68b220247681354a650f0c.zip
cpython-0ec88b33d093db00ec68b220247681354a650f0c.tar.gz
cpython-0ec88b33d093db00ec68b220247681354a650f0c.tar.bz2
Fixed #1578: Problems in win_getpass
-rw-r--r--Lib/getpass.py8
-rw-r--r--Misc/NEWS2
2 files changed, 6 insertions, 4 deletions
diff --git a/Lib/getpass.py b/Lib/getpass.py
index 02fe527..a726189 100644
--- a/Lib/getpass.py
+++ b/Lib/getpass.py
@@ -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
diff --git a/Misc/NEWS b/Misc/NEWS
index bd8a3e7..3e3f0e4 100644
--- 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?
===========================