diff options
author | noah <noah@656d521f-e311-0410-88e0-e7920216d269> | 2006-07-21 17:34:56 +0000 |
---|---|---|
committer | noah <noah@656d521f-e311-0410-88e0-e7920216d269> | 2006-07-21 17:34:56 +0000 |
commit | 5060194c9e13b068c620d73cc69eaec90d8f985d (patch) | |
tree | 54af546dc5969995833590fac84b9daacbad47dd | |
parent | 5c106add958f5eab3283cc0ac7464b3db2f3c1ee (diff) | |
download | pexpect-5060194c9e13b068c620d73cc69eaec90d8f985d.tar.gz |
Checkpoint.
git-svn-id: http://pexpect.svn.sourceforge.net/svnroot/pexpect/trunk@398 656d521f-e311-0410-88e0-e7920216d269
-rw-r--r-- | pexpect/pxssh.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pexpect/pxssh.py b/pexpect/pxssh.py index 48ee8fb..0cca5ae 100644 --- a/pexpect/pxssh.py +++ b/pexpect/pxssh.py @@ -1,5 +1,4 @@ from pexpect import * -#import os, sys, getopt, shutil class pxssh (spawn): """This class extends pexpect.spawn to specialize setting up SSH connections. @@ -23,7 +22,9 @@ class pxssh (spawn): s.logout() """ - def __init__ (self): + def __init__ (self, timeout=30, maxread=2000, searchwindowsize=None, logfile=None, env=None): + super(pxssh, self).__init__(None,[],timeout,maxread,searchwindowsize,logfile,env) + self.name = '<pxssh>' # SUBTLE HACK ALERT! # Note that the command to set the prompt uses a slightly different string # than the regular expression to match it. This is because when you set the @@ -50,6 +51,7 @@ class pxssh (spawn): we could not match it. We still try to reset the prompt to something more unique. If that still fails then we return False. """ + print self.logfile cmd = "ssh -l %s %s" % (username, server) spawn.__init__(self, cmd, timeout=login_timeout) #, "(?i)no route to host"]) |