diff options
author | Raymond Hettinger <python@rcn.com> | 2003-09-22 06:25:10 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-09-22 06:25:10 (GMT) |
commit | 1e8035973325158eaa134164e7d6882c000774ff (patch) | |
tree | ba17aad0e0fe6d7d341ba9a5f2ad6f9b6b68896e /Doc/lib | |
parent | 9832613beba817aa3d6abfde85eba40a9173fcdc (diff) | |
download | cpython-1e8035973325158eaa134164e7d6882c000774ff.zip cpython-1e8035973325158eaa134164e7d6882c000774ff.tar.gz cpython-1e8035973325158eaa134164e7d6882c000774ff.tar.bz2 |
Clean-up example code: remove string module and backticks.
Diffstat (limited to 'Doc/lib')
-rw-r--r-- | Doc/lib/libsmtplib.tex | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Doc/lib/libsmtplib.tex b/Doc/lib/libsmtplib.tex index d461a32..92661db 100644 --- a/Doc/lib/libsmtplib.tex +++ b/Doc/lib/libsmtplib.tex @@ -264,7 +264,6 @@ processing of the \rfc{822} headers. In particular, the `To' and \begin{verbatim} import smtplib -import string def prompt(prompt): return raw_input(prompt).strip() @@ -275,7 +274,7 @@ print "Enter message, end with ^D (Unix) or ^Z (Windows):" # Add the From: and To: headers at the start! msg = ("From: %s\r\nTo: %s\r\n\r\n" - % (fromaddr, string.join(toaddrs, ", "))) + % (fromaddr, ", ".join(toaddrs))) while 1: try: line = raw_input() @@ -285,7 +284,7 @@ while 1: break msg = msg + line -print "Message length is " + `len(msg)` +print "Message length is " + repr(len(msg)) server = smtplib.SMTP('localhost') server.set_debuglevel(1) |