From: <kai...@t-...> - 2003-10-23 12:39:09
|
Jim Kleckner wrote: > I added the code below to termdefs.py to allow hardcopy > to work with pdf. Thanks, I just added this to CVS. Sorry I didn't get it into the release. > I also found that the temporary file was being removed before > the gnuplot process was done with it. Adding a sleep() of a > few seconds made it work but that was kind of a kludge. > Adding a g.gnuplot.gnuplot.close() worked fine since it > causes a wait for the popen() process to exit (if not using > inline). I wonder if there is some way to put this into > the __del__() function at a place where this would happen > naturally? I tried the obvious on Gnuplot but it didn't work. The temporary-file removal problem is discussed in FAQ.txt. Under what circumstances exactly did calling close() help? It would probably make more sense to add a close() method to the GnuplotProcess objects because its implementation is likely to be platform-specific. Then I guess Gnuplot should call the close() method in its own __del__ method. Hmmm, I guess this helps by ensuring that the pipe is closed before the plotitems are destroyed. OK, I just implemented this in CVS, too. Thanks for your note and suggestions! Michael -- Michael Haggerty mh...@al... |