Oct-03-2023, 07:59 AM
I fixed it by simply modifiying getpass.py like this:
Adding "import msvcrt" to the imports in the first lines of the module
And mofying the last code line (an else statement) to "getpass = win_getpass"
Adding "import msvcrt" to the imports in the first lines of the module
And mofying the last code line (an else statement) to "getpass = win_getpass"
"""Utilities to get a password and/or the current user name. getpass(prompt[, stream]) - Prompt for a password, with echo turned off. getuser() - Get the user name from the environment or password database. GetPassWarning - This UserWarning is issued when getpass() cannot prevent echoing of the password contents while reading. On Windows, the msvcrt module will be used. """ # Authors: Piers Lauder (original) # Guido van Rossum (Windows support and cleanup) # Gregory P. Smith (tty support & GetPassWarning) import contextlib import io import os import sys import warnings import msvcrt # added # ... else: getpass = win_getpass # unix_getpassThis might have broken Unix support but I don't really care since I use Windows.