Questions tagged [telnetlib3]
5 questions
3
votes
2 answers
Python telnetlib3 examples
I would like to understand how to use telnetlib3 for a simple scenario.
The longstanding telnetlib (not 3) has a simple example at https://docs.python.org/3/library/telnetlib.html where the python program connects to a telnet server, then looks for…

gwideman
- 2,705
- 1
- 24
- 43
0
votes
1 answer
How to fix this AttributeError related to telnetlib3 in python on windows?
In windows 10 I want to write an async-free version of telnetlib3 with python 3.10.11. I created the code I will attach to the end of my question, which seem to work fine in creating a new telnet connection and read data. However, when I use the…

Alex
- 41,580
- 88
- 260
- 469
0
votes
1 answer
How to use telnetlib3 as a fixture as part of a py.test test case?
As telnetlib seems to get deprecated in future python version I am trying to use telnetlib3 instead (using python 3.10.11, windows 10). I want this to use as a fixture for user-friendly py.test tests. So for that I define a class for the telnet3 as…

Alex
- 41,580
- 88
- 260
- 469
0
votes
2 answers
How to read telnet output with telnetlib3 and python?
Using python 3.8.10 and telnetlib I want to connect to a host and just print out the message the host is sending upon connection. I have been trying the following code:
import telnetlib3
import asyncio
async def run_telnet_session():
…

Alex
- 41,580
- 88
- 260
- 469
-1
votes
1 answer
How to use telnetlib3 to write and read to/from a telnet connection using python?
I am trying to use telnetlib3 with python 3.8.10 to open a connection, write data to it and try to read the reply. This is the code I am using:
reader,writer = asyncio.run(telnetlib3.open_connection(host, port))
writer.write("$SYS,INFO")
reply =…

Alex
- 41,580
- 88
- 260
- 469