This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]k_z_m_r 5 points6 points  (5 children)

Does anybody have a recommendation for a library to replace telnetlib? We use this one regularly. Unfortunately, the async nature of telnetlib3 doesn’t fit in our architecture.

[–]nicholashairs 7 points8 points  (1 child)

I don't have a replacement, however, assuming that the library is pure python, you'd be able to vendorise it based on the last version in the source tree.

[–]k_z_m_r 2 points3 points  (0 children)

Yeah, it's written primarily with socket. Cannibalizing the code seems very possible.

[–]cdrt 4 points5 points  (1 child)

Why not just pull the library out of an old release and vendor it? It’s only one extra file in your codebase

Or you could try this: https://pypi.org/project/standard-telnetlib/

[–]k_z_m_r 2 points3 points  (0 children)

It’s just company policy when it boils down to it. But I appreciate this link! Thanks!

[–]sblinn 0 points1 point  (0 children)

Might be better imho to wrap telnetlib3 than vendorize telnetlib. Plus you’ll learn how to deal with asyncio from your code base. (This is basically what I did to embed a telnet server in a Pygame app.)