Module getpass
Utilities to get a password and/or the current user name.
getpass(prompt) - prompt for a password, with echo turned off
getuser() - get the user name from the environment or password
database
On Windows, the msvcrt module will be used. On the Mac
EasyDialogs.AskPassword is used, if available.
|
unix_getpass(prompt=' Password: ' ,
stream=None)
Prompt for a password, with echo turned off. |
|
|
|
win_getpass(prompt=' Password: ' ,
stream=None)
Prompt for password with echo off, using Windows getch(). |
|
|
|
default_getpass(prompt=' Password: ' ,
stream=None) |
|
|
|
_raw_input(prompt='
' ,
stream=None) |
|
|
|
getuser()
Get the username from the environment or password database. |
|
|
|
getpass(prompt=' Password: ' ,
stream=None)
Prompt for a password, with echo turned off. |
|
|
Imports:
sys,
termios,
msvcrt,
AskPassword
unix_getpass(prompt=' Password: ' ,
stream=None)
|
|
Prompt for a password, with echo turned off. The prompt is written on
stream, by default stdout.
Restore terminal settings at end.
|
Get the username from the environment or password database.
First try various environment variables, then the password database.
This works on Windows as long as USERNAME is set.
|
getpass(prompt=' Password: ' ,
stream=None)
|
|
Prompt for a password, with echo turned off. The prompt is written on
stream, by default stdout.
Restore terminal settings at end.
|