diff options
author | Guido van Rossum <guido@python.org> | 1998-12-08 16:30:10 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-12-08 16:30:10 (GMT) |
commit | aac399b80b1eeccaf6a5ad55d391a99a5a9aa7d7 (patch) | |
tree | 52eff630d7214233a82490de5288ae79b2ff0c2f /Doc/lib | |
parent | b057dd8efa838b0de23ce3acadba6a5b64f768e3 (diff) | |
download | cpython-aac399b80b1eeccaf6a5ad55d391a99a5a9aa7d7.zip cpython-aac399b80b1eeccaf6a5ad55d391a99a5a9aa7d7.tar.gz cpython-aac399b80b1eeccaf6a5ad55d391a99a5a9aa7d7.tar.bz2 |
Correct the poplib example. Stephan Richter pointed out some problems
with it.
Diffstat (limited to 'Doc/lib')
-rw-r--r-- | Doc/lib/libpoplib.tex | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/lib/libpoplib.tex b/Doc/lib/libpoplib.tex index e3ec5e1..6485a77 100644 --- a/Doc/lib/libpoplib.tex +++ b/Doc/lib/libpoplib.tex @@ -119,15 +119,15 @@ Here is a minimal example (without error checking) that opens a mailbox and retrieves and prints all messages: \begin{verbatim} -import getpass, poplib, string +import getpass, poplib M = poplib.POP3('localhost') M.user(getpass.getuser()) -M.pass(getpass.getpass()) +M.pass_(getpass.getpass()) numMessages = len(M.list()[1]) for i in range(numMessages): for j in M.retr(i+1)[1]: - sys.stdout.write(j) + print j \end{verbatim} At the end of the module, there is a test section that contains a more |