Kain added the comment:

Had the same problem but was able to fix this by rewriting the win_getpass 
method in getpass.py:

def win_getpass(prompt='Password: ', stream=None):
    """Prompt for password with echo off, using Windows getch()."""
    if sys.stdin is not sys.__stdin__:
        return fallback_getpass(prompt, stream)
    import msvcrt
    for c in prompt:
        msvcrt.putch(c.encode('utf-8'))
    pw = ""
    while 1:
        c = msvcrt.getch()
        if c == '\r'.encode('utf-8') or c == '\n'.encode('utf-8'):
            break
        if c == '\003'.encode('utf-8'):
            raise KeyboardInterrupt
        if c == '\b'.encode('utf-8'):
            pw = pw[:-1]
        else:
            pw = pw + c.decode('utf-8')
    msvcrt.putch('\r'.encode('utf-8'))
    msvcrt.putch('\n'.encode('utf-8'))
    return pw

----------
nosy: +Kain

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23995>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to