期望/发送密码时出现pexpect.EOF错误

时间:2015-03-27 09:00:51

标签: python python-2.7 unix pexpect

我在unix环境下运行此命令。但我有这些持续的问题! OUTPUT: 后: 匹配:无 match_index:无 exitstatus:无 flag_eof:是的 pid:17368 child_fd:3 关闭:错误 超时:30 分隔符: logfile:无 logfile_read:无 logfile_send:无 maxread:2000 ignorecase:假 searchwindowsize:无 delaybeforesend:0.05 delayafterclose:0.1 delayafterterminate:0.1

mycode:
p = pexpect.spawn('/bin/bash -c "depndnt setup_links:pure-python-2.7,host=myhost1"')
p.expect ('password:')
p.sendline ('mypassword')
p.expect(pexpect.EOF)
print(p.before)

0 个答案:

没有答案