ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Today i have download pexpect and started working on it. I want to access my cisco router and capture the output of "show version". So far i am successful in configuring the router. Pls check the script below
child.sendline("int loo 200") child.logfile = sys.stdout
Now on my router, the configuration was done perfectly. Which means my pexpect script is working fine. But i am not able to get the following
1) I want to capture the output of 'show version' (or any other command) to a file. When i googled, the last bolded line seemed to be the solution but its not working. When i run the script, it simply runs and then i get the prompt again, no output of show version :-(