diff options
| author | Neal Norwitz <nnorwitz@gmail.com> | 2006-03-17 06:49:51 (GMT) |
|---|---|---|
| committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-03-17 06:49:51 (GMT) |
| commit | ce96f69d69a6020c780145c89a17a8391b63624b (patch) | |
| tree | 7325a9bfaddf191e49910532df1fa4210c335196 /Doc/lib/libcrypt.tex | |
| parent | 9e2b9665ae9f94a07da54156c48e2cd411a23746 (diff) | |
| download | cpython-ce96f69d69a6020c780145c89a17a8391b63624b.zip cpython-ce96f69d69a6020c780145c89a17a8391b63624b.tar.gz cpython-ce96f69d69a6020c780145c89a17a8391b63624b.tar.bz2 | |
Get rid of a bunch more raw_input references
Diffstat (limited to 'Doc/lib/libcrypt.tex')
| -rw-r--r-- | Doc/lib/libcrypt.tex | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/lib/libcrypt.tex b/Doc/lib/libcrypt.tex index b6a1463..55e7163 100644 --- a/Doc/lib/libcrypt.tex +++ b/Doc/lib/libcrypt.tex @@ -41,6 +41,12 @@ A simple example illustrating typical use: \begin{verbatim} import crypt, getpass, pwd +def raw_input(prompt): + import sys + sys.stdout.write(prompt) + sys.stdout.flush() + return sys.stdin.readline() + def login(): username = raw_input('Python login:') cryptedpasswd = pwd.getpwnam(username)[1] |
