[Tutor] Capture telnet output to a file?

dpotter at nc.rr.com dpotter at nc.rr.com
Mon Oct 16 20:18:35 CEST 2006


That looks like it will do what I want.

Thank You!

----- Original Message -----
From: Kent Johnson <kent37 at tds.net>
Date: Monday, October 16, 2006 2:06 pm
Subject: Re: [Tutor] Capture telnet output to a file?
To: dpotter at nc.rr.com
Cc: tutor at python.org

> dpotter at nc.rr.com wrote:
> > Hello,
> > 
> > I am trying to capture telnet output to a file.  For example I 
> want to
> > telnet into a router and run the command “show arp” and be able to
> > capture all the arp information that normally would show up on the
> > screen to a file on my system.    I am using python and pexpect to
> > backup my router configurations on a daily basis, but for this the
> > router has the option to send the configuration via tftp to a 
> server,> there is no option to send normal screen data to a file.  
> Any ideas?
> 
> You might be able to do this using telnetlib instead of pexpect.
> 
> Kent
> 


More information about the Tutor mailing list