From: Dima K. <gn...@di...> - 2018-08-17 20:15:44
|
Hi. I'm looking for a feature that (I think) doesn't exist currently. Want to ask first, in case something DOES exist that I'm not seeing. A number of applications that make plots use gnuplot as a backend. The sequence you want there is: 1. User says "make a plot" 2. Application tells gnuplot to make a plot 3. gnuplot does its thing using an interactive terminal (x11, qt, wxt, ...) and a plot window pops up 4. user looks at the plot, then closes the window when they're done, and wants to continue using the application The issue here is that currently the application (parent of the "gnuplot" process) has no way of knowing when the user finished looking at the plot, which necessitates ugly workarounds. For instance with gnuplotlib I can write a script that just makes a plot. If I just call gnuplotlib.plot(), then the application will make a plot and then exit immediately. As a workaround I put a sleep(10000) after the plot() call. I'd like to have some sort of gnuplotlib.wait() that blocks until gnuplot is done. Maybe gnuplot can be asked to print something on the console when the client window is closed, or something? Thoughts? |