Is there a way in which the all the logging done using pexpect can be sent to stdout as well as a file.
eg.
filea = file('output.lo g',"w")
ssh = pexpect.spawn(' ssh root@1.1.1.1')
ssh.logfile = filea
ssh.expect('*as sword',timeout= 5)
......
In the above script, the output would be stored only in the logfile, is there a way in which it can be even be sent to sys.stdout at the same time.
Thanks
eg.
filea = file('output.lo g',"w")
ssh = pexpect.spawn(' ssh root@1.1.1.1')
ssh.logfile = filea
ssh.expect('*as sword',timeout= 5)
......
In the above script, the output would be stored only in the logfile, is there a way in which it can be even be sent to sys.stdout at the same time.
Thanks