Matanya Stroh <matanya.st...@gmail.com> added the comment: for getpass.win_getpass() it can simply be done by adding this line msvcrt.putch("*"). So the code will look like:
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) for c in prompt: msvcrt.putwch(c) pw = "" while 1: c = msvcrt.getwch() if c == '\r' or c == '\n': break if c == '\003': raise KeyboardInterrupt if c == '\b': pw = pw[:-1] else: pw = pw + c msvcrt.putch("*") #Line that was added msvcrt.putwch('\r') msvcrt.putwch('\n') return pw ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32884> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com