Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1e80359

Browse files
committed
Clean-up example code: remove string module and backticks.
1 parent 9832613 commit 1e80359

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Doc/lib/libsmtplib.tex

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ \subsection{SMTP Example \label{SMTP-example}}
264264

265265
\begin{verbatim}
266266
import smtplib
267-
import string
268267
269268
def prompt(prompt):
270269
return raw_input(prompt).strip()
@@ -275,7 +274,7 @@ \subsection{SMTP Example \label{SMTP-example}}
275274
276275
# Add the From: and To: headers at the start!
277276
msg = ("From: %s\r\nTo: %s\r\n\r\n"
278-
% (fromaddr, string.join(toaddrs, ", ")))
277+
% (fromaddr, ", ".join(toaddrs)))
279278
while 1:
280279
try:
281280
line = raw_input()
@@ -285,7 +284,7 @@ \subsection{SMTP Example \label{SMTP-example}}
285284
break
286285
msg = msg + line
287286
288-
print "Message length is " + `len(msg)`
287+
print "Message length is " + repr(len(msg))
289288
290289
server = smtplib.SMTP('localhost')
291290
server.set_debuglevel(1)

0 commit comments

Comments
 (0)