(prompt='Password: ', stream=None, *, echo_char=None)
| 133 | |
| 134 | |
| 135 | def fallback_getpass(prompt='Password: ', stream=None, *, echo_char=None): |
| 136 | _check_echo_char(echo_char) |
| 137 | import warnings |
| 138 | warnings.warn("Can not control echo on the terminal.", GetPassWarning, |
| 139 | stacklevel=2) |
| 140 | if not stream: |
| 141 | stream = sys.stderr |
| 142 | print("Warning: Password input may be echoed.", file=stream) |
| 143 | return _raw_input(prompt, stream, echo_char=echo_char) |
| 144 | |
| 145 | |
| 146 | def _check_echo_char(echo_char): |
no test coverage detected