Pexpect Example


/ Published in: Python
Save to your folder(s)



Copy this code and paste it in your HTML
  1. import pexpect
  2. password = open("config/qlive.auth", "r").readline().strip()
  3. p = pexpect.spawn("sudo bash install_dynamicctrl.sh")
  4. i = p.expect([".ssword:*", pexpect.EOF])
  5. p.sendline(password)

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.