Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
2bef51e3
Commit
2bef51e3
authored
Sep 22, 2003
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean-up example code: remove string module and backticks.
parent
2f5bab45
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
Doc/lib/libsmtplib.tex
Doc/lib/libsmtplib.tex
+2
-3
No files found.
Doc/lib/libsmtplib.tex
View file @
2bef51e3
...
@@ -264,7 +264,6 @@ processing of the \rfc{822} headers. In particular, the `To' and
...
@@ -264,7 +264,6 @@ processing of the \rfc{822} headers. In particular, the `To' and
\begin{verbatim}
\begin{verbatim}
import smtplib
import smtplib
import string
def prompt(prompt):
def prompt(prompt):
return raw
_
input(prompt).strip()
return raw
_
input(prompt).strip()
...
@@ -275,7 +274,7 @@ print "Enter message, end with ^D (Unix) or ^Z (Windows):"
...
@@ -275,7 +274,7 @@ print "Enter message, end with ^D (Unix) or ^Z (Windows):"
# Add the From: and To: headers at the start!
# Add the From: and To: headers at the start!
msg = ("From:
%s\r\nTo: %s\r\n\r\n"
msg = ("From:
%s\r\nTo: %s\r\n\r\n"
% (fromaddr,
string.join(toaddrs, ", "
)))
% (fromaddr,
", ".join(toaddrs
)))
while 1:
while 1:
try:
try:
line = raw
_
input()
line = raw
_
input()
...
@@ -285,7 +284,7 @@ while 1:
...
@@ -285,7 +284,7 @@ while 1:
break
break
msg = msg + line
msg = msg + line
print "Message length is " +
`len(msg)`
print "Message length is " +
repr(len(msg))
server = smtplib.SMTP('localhost')
server = smtplib.SMTP('localhost')
server.set
_
debuglevel(1)
server.set
_
debuglevel(1)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment