mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
Bug #1445068: getpass.getpass() can now be given an explicit stream
argument to specify where to write the prompt.
This commit is contained in:
parent
22ec80bc4f
commit
338ef7d2bd
3 changed files with 24 additions and 12 deletions
|
|
@ -11,11 +11,15 @@
|
|||
The \module{getpass} module provides two functions:
|
||||
|
||||
|
||||
\begin{funcdesc}{getpass}{\optional{prompt}}
|
||||
\begin{funcdesc}{getpass}{\optional{prompt\optional{, stream}}}
|
||||
Prompt the user for a password without echoing. The user is
|
||||
prompted using the string \var{prompt}, which defaults to
|
||||
\code{'Password: '}.
|
||||
\code{'Password: '}. On \UNIX, the prompt is written to the
|
||||
file-like object \var{stream}, which defaults to
|
||||
\code{sys.stdout} (this argument is ignored on Windows).
|
||||
|
||||
Availability: Macintosh, \UNIX, Windows.
|
||||
\versionadded[The \var{stream} parameter]{2.5}
|
||||
\end{funcdesc}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue