Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Q] sending binary data in expect

37 views
Skip to first unread message

Henry Ptasinski

unread,
Nov 5, 1995, 3:00:00 AM11/5/95
to
Hi,

I'm trying to automate a control application with expect and I'm having
some difficulty handling binary data. After spawing a process and
doing some initial configuration, I need to transmit a block of binary
data from a file to the spawned process. I've been trying to work
with the process as a file in tcl using exp_open, but I can't seem to get
the data from the binary file into the process.

Anybody have some ideas for an easy (or at least workable) way to
do this?

Thanks,
--
Henry Ptasinski
he...@logout.com

Matt DiMeo

unread,
Nov 9, 1995, 3:00:00 AM11/9/95
to
In article <47j2lo$i...@rosebud.sdsc.edu>,

Henry Ptasinski <he...@hptasins.cerfnet.com> wrote:
>with the process as a file in tcl using exp_open, but I can't seem to get
>the data from the binary file into the process.

Among tcl's flaws is it's total inability to handle binary data properly.
You'll probably need to write some C code in order to handle blobs of
arbitrary data. You might have to extend expect as well.

Best of luck,
-m@

Don Libes

unread,
Nov 13, 1995, 3:00:00 AM11/13/95
to

Expect can read/write nulls. Read page 281 in the Expect book for
more info.

Don

0 new messages