Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5ac2a07

Browse files
committed
Basic documentation for the getpass module.
1 parent 8522041 commit 5ac2a07

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

Doc/lib/libgetpass.tex

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
\section{\module{getpass}
2+
--- Portable password reading.}
3+
4+
\declaremodule{standard}{getpass}
5+
\moduleauthor{Piers Lauder}{[email protected]}
6+
% Windows support by Guido van Rossum.
7+
\sectionauthor{Fred L. Drake, Jr.}{[email protected]}
8+
9+
\modulesynopsis{Portable reading of passwords and retrieval of the userid.}
10+
11+
12+
The \module{getpass} module provides two functions:
13+
14+
15+
\begin{funcdesc}{getpass}{\optional{prompt}}
16+
Prompt the user for a password without echoing. The user is
17+
prompted using the string \var{prompt}, which defaults to
18+
\code{'Password: '}.
19+
\end{funcdesc}
20+
21+
22+
\begin{funcdesc}{getuser}{}
23+
Return the ``login name'' of the user.
24+
25+
This function checks the environment variables \envvar{LOGNAME},
26+
\envvar{USER}, \envvar{LNAME} and \envvar{USERNAME}, in order, and
27+
returns the value of the first one which is set to a non-empty
28+
string. If none are set, the login name from the password database
29+
is returned on systems which support the \module{pwd} module,
30+
otherwise, an exception is raised.
31+
\end{funcdesc}

0 commit comments

Comments
 (0)