summaryrefslogtreecommitdiff
path: root/pexpect/pxssh.py
diff options
context:
space:
mode:
authornoah <noah@656d521f-e311-0410-88e0-e7920216d269>2006-07-21 17:34:56 +0000
committernoah <noah@656d521f-e311-0410-88e0-e7920216d269>2006-07-21 17:34:56 +0000
commitd7cd03237b8e98311e2c0e42c7eef19f7bfe3100 (patch)
tree54af546dc5969995833590fac84b9daacbad47dd /pexpect/pxssh.py
parent05e91b09dfd7dd92793dee9deef3efd7a4beae08 (diff)
downloadpexpect-d7cd03237b8e98311e2c0e42c7eef19f7bfe3100.tar.gz
Checkpoint.
Diffstat (limited to 'pexpect/pxssh.py')
-rw-r--r--pexpect/pxssh.py6
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"])