[issue28661] Fix code example in Python 3.5 telnetlib documentation

2021-06-22 Thread Norman Lorrain
Norman Lorrain added the comment: How about a simpler example (this relies on an outside service, fwiw) See attached file. -- nosy: +Norman Lorrain Added file: https://bugs.python.org/file50124/weather.py ___ Python tracker

[issue28661] Fix code example in Python 3.5 telnetlib documentation

2021-06-21 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +easy versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___

[issue28661] Fix code example in Python 3.5 telnetlib documentation

2016-11-11 Thread R. David Murray
R. David Murray added the comment: Hmm. I'm surprised that OSX would be different. I didn't actually experiment to confirm it on linux, either. I could be taken as a "teaching opportunity" to talk about exact match vs read_eager, in a comment before or after the example, if someone wants to

[issue28661] Fix code example in Python 3.5 telnetlib documentation

2016-11-10 Thread Ivan Tomilov
Ivan Tomilov added the comment: I see, thanks for the clarification. But in my OS X the things are different and I spent about 1 hour trying this code to take off. Maybe it's better to change this code to avoid spending time for such subtle bugs? Say: tn.read_until(b"Password:") tn.read_eager()

[issue28661] Fix code example in Python 3.5 telnetlib documentation

2016-11-10 Thread R. David Murray
R. David Murray added the comment: Well, the example code is correct for a typical telnet service running on a unix variant. That will output a space after the colon, so that the user's input is separated from the colon when they start to type. -- nosy: +r.david.murray

[issue28661] Fix code example in Python 3.5 telnetlib documentation

2016-11-10 Thread Ivan Tomilov
New submission from Ivan Tomilov: The code sample on page https://docs.python.org/3/library/telnetlib.html is a little confusing. The extra space in string "Password: " before the second quote basically hangs the example program when you try to run it. Please, check my answer on Stack