Commits

Anonymous committed e2b9d43

Clean-up example code: remove string module and backticks.

  • Participants
  • Parent commits ad253c0
  • Branches 2.3

Comments (0)

Files changed (1)

File Doc/lib/libsmtplib.tex

 
 \begin{verbatim}
 import smtplib
-import string
 
 def prompt(prompt):
     return raw_input(prompt).strip()
 
 # 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()
         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)