You see an error like this when an appropriate match occurs if the events map contains self.method calls.
runout=pexpect.run('cat vpnout',timeout=1,events=events,extra_args=self)
File "/usr/lib/python2.4/site-packages/pexpect.py", line 215, in run
raise TypeError ('The callback must be a string or function type.')
The fix is easy:
Change line 207 of pexpect.py to the following:
elif type(responses[index]) is types.FunctionType or type(responses[index]) is types.MethodType:
(basically, add in a check for MethodType as well.
Thanks,
Christian
cpw@weeksfamily.ca