Commit 0ec88b33 authored by Christian Heimes's avatar Christian Heimes

Fixed #1578: Problems in win_getpass

parent 2f1019e7
......@@ -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
......
......@@ -25,6 +25,8 @@ Extension Modules
Library
-------
- Issue #1578: Problems in win_getpass
What's New in Python 3.0a2?
===========================
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment