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 [EMAIL PROTECTED] ls -la')
child.setlog(logfile)
child.setmaxread(1000)
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?

Thanks,
Sonny


<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>

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to