python expect
时间:2010-09-29 来源:jiaminqiang
#!/usr/bin/python
import pexpect
foo = pexpect.spawn('passwd mqjia')
foo.expect("New UNIX password:")
foo.sendline("1234567")
foo.expect("Retype new UNIX password:")
foo.sendline("1234567")
foo.interact()
相关阅读 更多 +
排行榜 更多 +