Expect, sessions and packages
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Expect, sessions and packages

From: Paul D.Smith <paul_d_smith@x-hotmail.com>
Date: Fri Jul 29 2005 - 10:33:31 CEST

I have created a package of simple "telnet"ed commands but can't find a way
to have a "session" span the package. Currently, my expect script locks
like this...

package require mypack 1.0
spawn telnet host
mypack::op1
mypack::op2
...
close

Is there anyway I can move the spawn into my package and have the package
track the session? I suppose I can pass a handle in and out, perhaps. Is
that the way to go?

BTW, I probably only ever have a single session but I suppose handling
multiples would be useful.

Cheers,
Paul DS

-- 
Please remove the "x-" if replying to sender.
Received on Thu Sep 29 14:27:53 2005