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
3de7fb86
Commit
3de7fb86
authored
Oct 15, 2008
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Victor Stinner's patch to make telnetlib use bytes 3725
parent
33b6450d
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
110 additions
and
108 deletions
+110
-108
Doc/library/telnetlib.rst
Doc/library/telnetlib.rst
+6
-6
Lib/telnetlib.py
Lib/telnetlib.py
+102
-102
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Doc/library/telnetlib.rst
View file @
3de7fb86
...
...
@@ -225,14 +225,14 @@ A simple example illustrating typical use::
tn = telnetlib.Telnet(HOST)
tn.read_until("login: ")
tn.write(user
+
"\n")
tn.read_until(
b
"login: ")
tn.write(user
.encode('ascii') + b
"\n")
if password:
tn.read_until("Password: ")
tn.write(password
+
"\n")
tn.read_until(
b
"Password: ")
tn.write(password
.encode('ascii') + b
"\n")
tn.write("ls\n")
tn.write("exit\n")
tn.write(
b
"ls\n")
tn.write(
b
"exit\n")
print(tn.read_all())
Lib/telnetlib.py
View file @
3de7fb86
This diff is collapsed.
Click to expand it.
Misc/NEWS
View file @
3de7fb86
...
...
@@ -31,6 +31,8 @@ Core and Builtins
Library
-------
- telnetlib now works completely in bytes.
- Issue #4072: Restore build_py_2to3.
- Issue #4014: Don't claim that Python has an Alpha release status, in addition
...
...
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