fgimian / paramiko-expect

A Python expect-like extension for the Paramiko SSH library which also supports tailing logs.
MIT License
204 stars 78 forks source link

sys.maxint is not defined in Python 3 #14

Closed gerhardusmuller closed 7 years ago

gerhardusmuller commented 8 years ago

Line 203 paramikoe.py - the suggested alternative is sys.maxsize - which I presume does not exist in Python 2 again

gerhardusmuller commented 8 years ago

You may have fixed the Python 3 issues already. The rest revolve around Python handling bytes and strings distinctly. sys.maxsize did not work. Somewhere else raised an exception that it was too big so I simply set it to a large number such as 2<<20. If it would be of any help I can upload my fixed paramikoe.py which you can diff then.

fruch commented 7 years ago

look like sys.maxside is the correct way to go, a bug in python3.2 is the reason it didn't worked for you python 3.3 and upwards is working just fine (add test for this in my fork)

fruch commented 7 years ago

@gerhardusmuller I've fixed it on master, it working from most python 3 (I think python 3.2 is bit broken) ping if python 3.2 is importent for you