File "/usr/lib64/python2.5/telnetlib.py", line 289, in write
if IAC in buffer:
TypeError: 'in
A fix for that in python 2.X can be forcing encoding of string you send to telnet, i.e. instead of
telnetconnection.write('just a test')
Use
telnetconnection.write('just a test').encode('latin-1'))
2 comments:
Thanks. Run into the same problem. Helped me a lot.
Niki
Спасибо, минут 20 пытался найти ошибку в трех строчках своего кода =)
Post a Comment