summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libcrypt.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/lib/libcrypt.tex')
-rw-r--r--Doc/lib/libcrypt.tex6
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]