Commit 60250e28 authored by Guido van Rossum's avatar Guido van Rossum

win_getpass(): if sys.stdin is not sys.__stdin__, use

default_getpass().  This should prevent hanging when it is called in
IDLE.

Fixes SF bug #455648.
parent 8019913e
......@@ -42,6 +42,8 @@ def unix_getpass(prompt='Password: '):
def win_getpass(prompt='Password: '):
"""Prompt for password with echo off, using Windows getch()."""
if sys.stdin is not sys.__stdin__:
return default_getpass(prompt)
import msvcrt
for c in prompt:
msvcrt.putch(c)
......
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