Irit Katriel <iritkatr...@yahoo.com> added the comment:

This has been fixed by now:

Running Release|x64 interpreter...
Python 3.10.0a2+ (heads/bpo-42482:920f808f50, Nov 29 2020, 23:02:47) [MSC 
v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from telnetlib import Telnet
>>> import time
>>> tn = Telnet("scn.org", 23)
>>> time.sleep(5) # short wait for data to be available
>>> tn.expect(['.{16}'], 0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\User\src\cpython\lib\telnetlib.py", line 622, in expect
    m = list[i].search(self.cookedq)
TypeError: cannot use a string pattern on a bytes-like object
>>> tn.expect([b'.{16}'], 0)
(0, <re.Match object; span=(2, 18), match=b'Seattle Communit'>, b'\r\nSeattle 
Communit')
>>>

----------
nosy: +iritkatriel
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue14556>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to