Kaydet (Commit) 3de7fb86 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

Victor Stinner's patch to make telnetlib use bytes 3725

üst 33b6450d
......@@ -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())
This diff is collapsed.
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment