jquast / telnetlib3

Python Telnet server and client Protocol library using asyncio
Other
144 stars 32 forks source link

telnetlib3 without asyncio? #78

Open alex4200 opened 1 year ago

alex4200 commented 1 year ago

Hello, would it be possible to create a telnetlib module without this asyncio overhead? In my case this makes the code EXTREMLY more cumbersome, unreadable and complicated. Thanks

jquast commented 1 year ago

Hello @alex4200, I understand the need to write code without asyncio and I would like to do that.

In the mean time, I suggest https://github.com/shmup/miniboa for a server without asyncio, @shmup maintains it well. As for client, even though python 3.11 warns that telnet.py is to be deprecated, you can simply copy telnet.py into your own project.


Roughly thinking, telnetlib3 without asyncio would still use asyncio under the hood.

alex4200 commented 1 year ago

Thanks for your input @jquast

Chef-de-IT commented 11 months ago

I definitely support this enhancement, @jquast !

Transitioning from telnetlib to telnetlib3 would, for sure ,benefit from adding a sync API to the latter (with it being perfectly fine to use asyncio under the hood). Some use cases (e.g. AppDaemon in Home Assistant) make it fairly difficult to integrate and troubleshoot a telnetlib3 client without a sync way to interface with it, such as perhaps via a sync connection call and callbacks for any "see text from server and respond to it" shell interactions.