Interactive module.


Ask the use for confirmation in interactive mode.

Parameters:message (str) -- the message to be printed before asking for confirmation.
Raises:SpicerackError -- on too many invalid answers or if not in a TTY.

Ensure it is running either in non-interactive mode or in a screen/tmux session, raise otherwise.

Raises:spicerack.exceptions.SpicerackError -- if in a non-durable shell session.

Get the management password either from the environment or asking for it.

Returns:the password.
Return type:str
Raises:spicerack.exceptions.SpicerackError -- if the password is empty.

Detect and return the name of the effective running user even if run as root.

Returns:the name of the effective running user or '-' if unable to detect it.
Return type:str