New concept
When standard input is a terminal (input is coming from a terminal/user, I suspect), getpass is used to read the passwords. Otherwise they are read using standard methods that do not require a terminal and allow scripting (passing standard input directly).
Effectively, passwords should now always be read - whether the user's input is handled by a terminal or not (the previous solution may have been incompatible with some platforms and shells).
Solution taken from this page.
Tested both approaches and both work :).
PR in accordance with #78
New concept When standard input is a terminal (input is coming from a terminal/user, I suspect),
getpass
is used to read the passwords. Otherwise they are read using standard methods that do not require a terminal and allow scripting (passing standard input directly). Effectively, passwords should now always be read - whether the user's input is handled by a terminal or not (the previous solution may have been incompatible with some platforms and shells).Solution taken from this page. Tested both approaches and both work :).