import telnetlib HOST = "10.100.57.250" tn = telnetlib.Telnet(HOST, port=8888, timeout=1) while True:    #Send your command to the host    tn.write(b"your_command\n\r")    time.sleep(1)    #Read back the returned value from the host for your_command sent to the host.    line = tn.read_some()     #Converting the read value into ascii     print('Value: ', line.decode('ascii')) tn.close()