I'm wondering if it is possible to know if my telnet connection is successful?
So, if I'm connected to my switch and if I could write commands
telnet = telnetlib.Telnet(IP)
telnet.read_until(b"User Name:")
telnet.write(b"LOGIN\n")
telnet.read_until(b"Password:")
telnet.write(b"PASSWORD\n")
# Here I want to know if I'm connected