# eric7.DebugClients.Python.getpass

Module implementing 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

This module is a replacement for the one found in the Python distribution. It is to provide a debugger compatible variant of the a.m. functions.

### Global Attributes

__all__
default_getpass
fallback_getpass
unix_getpass
win_getpass

### Classes

None

### Functions

getpass | Function to prompt for a password, with echo turned off.
getuser | Function to get the username from the environment or password database.

## getpass

getpass(prompt='Password: ', stream=None)

Function to prompt for a password, with echo turned off.

prompt (str)
  Prompt to be shown to the user
stream (file)
  input stream to read from (ignored)

Return:
  Password entered by the user

Return Type:
  str

Up

## getuser

getuser()

Function to 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.

Return:
  username

Return Type:
  str

Up