On 25/05/16 17:19, Alan Gauld via Tutor wrote:

> Here is an actual session using a public telnet site:
> 
>>>> import telnetlib
>>>> tn = telnetlib.Telnet('telehack.com')
>>>> response = tn.read_some()
>>>> b'\r\nConnected to TELEH'

Oops! a cut n paste error. That line should be:

>>> print(response[:20])
b'\r\nConnected to TELEH'


>>>> tn.close()


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to