Expect() from telnetlib giving me problems.
Marc
mnations at airmail.net
Thu Sep 12 17:25:31 EDT 2002
Hi,
This is the error I'm getting:
Exception in thread Thread-3:
Traceback (most recent call last):
File "C:\Python22\lib\threading.py", line 408, in __bootstrap
self.run()
File "C:\Python22\lib\threading.py", line 396, in run
apply(self.__target, self.__args, self.__kwargs)
File "main.py", line 85, in run
command[0](*command[1:3])
File "key.py", line 94, in command
read_result(conn)
File "key.py", line 104, in read_result
buffer = conn.expect(alist, 5)
File "C:\python22\lib\telnetlib.py", line 541, in expect
list[i] = re.compile(list[i])
File "C:\Python22\lib\sre.py", line 178, in compile
return _compile(pattern, flags)
File "C:\Python22\lib\sre.py", line 228, in _compile
raise error, v # invalid expression
error: nothing to repeat
I've tried several different ways to get the expect command to work. I
can't find any examples and only limited documentation. Here is how
I'm trying to implement it:
alist = [ 'COMPLD', '*/' ]
buffer = conn.expect(alist, 5)
Can someone please tell me what is wrong or provide me with some
working examples of using the command.
Thanks,
Marc
More information about the Python-list
mailing list