From: <kai...@t-...> - 2003-02-16 19:39:22
|
William Baxter wrote: >When I try to quit from my python programs that called gnuplot.py, they >complain "The program is still running; do you wish to kill it?" > >Even if I click "ok" they still won't go away. > >How do I clean up the gnuplot processes that I've started in python? > What operating system? It should be that when the Gnuplot.Gnuplot object is destroyed, then its self.gnuplot object should run out of reference counts and be destroyed. That object is a GnuplotProcess object which holds a popen file object. When the GnuplotProcess object is destroyed, the popen file object should be closed and destroyed, which should end the gnuplot process. At least that's the theory, and I've never had any trouble with it under Linux. It could be that the close-on-delete behavior of popen is not the same on your platform, or it could be that you are somehow holding a reference to the Gnuplot.Gnuplot object when your program ends (maybe via a circular reference?) Anyway, I should probably add a close() method to the Gnuplot.Gnuplot object to insist that the process is ended NOW (this will also be required if I ever get around to finishing off Jython support for Gnuplot.py). Yours, Michael -- Michael Haggerty mh...@al... |