Exepect, curses, and screen control

M

Matthew Twomey

I can't for the life of me figure this out:

I have a script I am working on that uses the Perl expect module. It
is sort of an interactive script. It lets the user interact with the
spawned process, then when the user hits a control key - it leaves the
interactive process, does something, possibly prints something, then
returns to "interact" mode. This all works fine and dandy.

I would like to add some screen control to this. The effect I am after
is as follows:

The user is interacting with the expect spawned process and hits the
control key. My perl script records the text of the line they were one
and the cursor X position (for later re-display) and proceeds about
it's business. At the end of this it re-prints that last line (before
the control key) and repositions the curser where is was.

I can do the screen control with the curses Perl module, but all the
output from expect is in a separate process and it's printing to
stdout, it's seems this means it's invisible to curses.

Any suggestions or other way I might achieve this?

-Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top