Re: pexpect - logging input AND output

2014-08-20 Thread Akira Li
sj.constant...@gmail.com writes: > i have a script running a few commands on a network device. i can't > seem to figure out how to log both the input and output of what the > pexpect script initiates and responds to. > > child = pexpect.spawn ('telnet '+ ip) > child.expect ('.*:*') > child.sendlin

Re: pexpect - logging input AND output

2014-08-14 Thread Chris Angelico
On Thu, Aug 14, 2014 at 6:59 PM, wrote: > i have a script running a few commands on a network device. i can't seem to > figure out how to log both the input and output of what the pexpect script > initiates and responds to. > > child = pexpect.spawn ('telnet '+ ip) If that's not working for yo

pexpect - logging input AND output

2014-08-14 Thread sj . constantine
i have a script running a few commands on a network device. i can't seem to figure out how to log both the input and output of what the pexpect script initiates and responds to. child = pexpect.spawn ('telnet '+ ip) child.expect ('.*:*') child.sendline (user) child.expect ('.*:*') child.sendline