import telnetlib
def espera_prompt():
return tn.read_until("\n>")
HOST = "111.1.112.125"
CRED = "juan soporte"
tn = telnetlib.Telnet(HOST)
espera_prompt()
tn.write(CRED + "\r\n")
numeros = ['012345678954']
emergencia = ['130','131','132','133','134','135','136','137','138','139','1400','1402','1403','1404','1405','1406','1407',
'1408', '1409','1411','1412','1413','1414','1415','1416','1418','1419','1420','1421','1424','1451','143','147',
'149']
mi_path = "fichero.txt"
with open(mi_path, 'a+') as f: