From: Fernando P. <Fer...@co...> - 2005-02-01 05:48:23
|
John Hunter wrote: >>>>>>"Fernando" == Fernando Perez <Fer...@co...> writes: > > Fernando> planck[pylab]> cat tkbug.py from matplotlib import pylab > > Fernando> pylab.plot(range(10)) pylab.show() > > Fernando> # Now I try to run this with plain python, no ipython in > Fernando> sight: > > This is the result of adding > > if rcParams['tk.pythoninspect']: > os.environ['PYTHONINSPECT'] = '1' > > to tkagg. Comment out the pythoninspect line (or set the rc param > accordingly) and see if makes a difference. The pythoninspect thing > appears to be required to make idle work in interactive mode, though > it was introduced for other reasons I won't go into now. OK, my report from this afternoon was written in the office, where I have mpl 0.71. I'm now home, and my laptop runs 0.70. Here, I don't see the problem at all. I can't test here the big code where I saw the massive mayavi breakdown, because that was written by my officemate. But at least I can confirm that 0.70, whose show() looks like: def show(): """ Show all the figures and enter the gtk mainloop This should be the last line of your script """ for manager in Gcf.get_all_fig_managers(): manager.show() import matplotlib matplotlib.interactive(True) #os.environ['PYTHONINSPECT'] = '1' if show._needmain: Tk.mainloop() show._needmain = False does not show the spurious prompt thingie (note the PYTHONINSPECT thingie is commented out). I'll try to make this change to 0.71 and test the larger code with the mayavi problems, but it may be a few days before I can do that. HTH, f |