getpass — Portable password input

Differences to Python

This module implements a subset of the upstream Python module. For more information, refer to the original documentation: getpass.

This module is used when executing on SR OS only. On a remote machine, the native Python getpass module is used.

The getpass module provides functions for user inputs of passwords without returning the characters to the screen.

Functions

getpass.getpass(prompt='Password: ')

Prompt the user for a password without echoing. The user is prompted using the string prompt, which defaults to 'Password: '.

Parameters

prompt (str, optional) – Optional string prompt to provide the user guidance.

Returns

The inputted value

Return type

str