Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(16)

Delta Between Two Patch Sets: Lib/telnetlib.py

Issue 22043: Use a monotonic clock to compute timeouts
Left Patch Set: Created 3 years, 2 months ago
Right Patch Set: Created 3 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « Lib/subprocess.py ('k') | Lib/test/test_selectors.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 r"""TELNET client class. 1 r"""TELNET client class.
2 2
3 Based on RFC 854: TELNET Protocol Specification, by J. Postel and 3 Based on RFC 854: TELNET Protocol Specification, by J. Postel and
4 J. Reynolds 4 J. Reynolds
5 5
6 Example: 6 Example:
7 7
8 >>> from telnetlib import Telnet 8 >>> from telnetlib import Telnet
9 >>> tn = Telnet('www.python.org', 79) # connect to finger port 9 >>> tn = Telnet('www.python.org', 79) # connect to finger port
10 >>> tn.write(b'guido\r\n') 10 >>> tn.write(b'guido\r\n')
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 except ValueError: 660 except ValueError:
661 port = socket.getservbyname(portstr, 'tcp') 661 port = socket.getservbyname(portstr, 'tcp')
662 tn = Telnet() 662 tn = Telnet()
663 tn.set_debuglevel(debuglevel) 663 tn.set_debuglevel(debuglevel)
664 tn.open(host, port, timeout=0.5) 664 tn.open(host, port, timeout=0.5)
665 tn.interact() 665 tn.interact()
666 tn.close() 666 tn.close()
667 667
668 if __name__ == '__main__': 668 if __name__ == '__main__':
669 test() 669 test()
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7