summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornoah <noah@656d521f-e311-0410-88e0-e7920216d269>2002-10-07 10:47:52 +0000
committernoah <noah@656d521f-e311-0410-88e0-e7920216d269>2002-10-07 10:47:52 +0000
commit1f789de5ded2eddc53fb4c57b9457e475e108537 (patch)
tree61a00ddb99bcceff966012f211212fca87bdf820
parentf78334f1c0cb00e6371a3e7eab395f157e5afd1c (diff)
downloadpexpect-1f789de5ded2eddc53fb4c57b9457e475e108537.tar.gz
Still looking...
git-svn-id: http://pexpect.svn.sourceforge.net/svnroot/pexpect/trunk@101 656d521f-e311-0410-88e0-e7920216d269
-rwxr-xr-xpexpect/examples/sshls.py2
-rw-r--r--pexpect/pexqa.py7
2 files changed, 3 insertions, 6 deletions
diff --git a/pexpect/examples/sshls.py b/pexpect/examples/sshls.py
index 9358c82..d51d499 100755
--- a/pexpect/examples/sshls.py
+++ b/pexpect/examples/sshls.py
@@ -9,7 +9,7 @@ host = raw_input('Hostname: ')
user = raw_input('User: ')
password = getpass.getpass('Password: ')
-child = pexpect.spawn("/usr/bin/ssh -l %s %s /bin/ls -l"%(user, host))
+child = pexpect.spawn("ssh -l %s %s /bin/ls -l"%(user, host))
child.expect('password:')
child.sendline(password)
diff --git a/pexpect/pexqa.py b/pexpect/pexqa.py
index 09dddc9..9e0f2fb 100644
--- a/pexpect/pexqa.py
+++ b/pexpect/pexqa.py
@@ -17,8 +17,8 @@ class s:
self.pid = self.child_fd = None
try:
- #self.pid, self.child_fd = posix.forkpty()
- self.pid, self.child_fd = pty.fork()
+ self.pid, self.child_fd = posix.forkpty()
+ #self.pid, self.child_fd = pty.fork()
except OSError, e:
raise Exception('posix.fork() failed: ' + str(e))
@@ -27,9 +27,6 @@ class s:
# Parent
- def __del__(self):
- if self.child_fd is not -1:
- os.close (self.child_fd)
print '1'
x = s('ls', ['ls'])