Pexpect getting a defuct process

Baillargeon, Sonny Sonny.Baillargeon at
Tue Jan 4 11:42:47 EST 2005

I am trying to use a pexpect script using python v2.3.4 with pexpect
module .999 on Solaris 8.

I try to execute this script.

#!/usr/bin/env python
'''This runs "ls -l" on a remote host using SSH.
    At the prompts enter hostname, user, and password.
import pexpect

logfile = open('sshls.log', 'w')

child = pexpect.spawn('ssh user at server ls -la')
child.expect(pexpect.EOF, timeout=180)
print child.before

This used to work before but now I get a defunct process after it runs.
Any ideas?


<FONT SIZE = 1>****************************************************************************
This e-mail and any attachments may contain confidential and privileged information. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this e-mail and destroy any copies. Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be illegal. Unless otherwise stated, opinions expressed in this e-mail are those of the author and are not endorsed by the author's employer.</FONT>

More information about the Python-list mailing list