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
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