before_after

[root@node110 pexpect]# cat simple9_before_after.py 
#1/usr/bin/env python
import pexpect
import sys


child = pexpect.spawn('ssh root@192.168.198.121')
fout = file('mylog.txt','w')
child.logfile = fout


child.expect(["password:"])
child.sendline("123456")
print "before:"+child.before
print "after:"+child.after
分割线
感谢打赏
江西数库信息技术有限公司
YWSOS.COM 平台代运维解决方案
 评论
 发表评论
姓   名:

Powered by AKCMS