Interactivity from a script


I am trying to use a script interacively. It basically needs to do the following.

* do some work
* plot()
* Ask whether to keep the data plotted or not

This should be done (initially) at the command line using raw_read().
I don't want to close the plot window to get back to the prompt.
In terms of a GUI this would be easy as the dialog would run in the same thread as the plot window.
But doesn't seem to be the solution.

BTW, I am running 0.54.2 as I can't get 0.60.2 to compile under debian stable.