urgent - Matplolib with IDLE!

Ana Paula Leite apoliveiraleite at gmail.com
Mon Mar 19 18:55:51 EDT 2007


Hi,

in site-packages/matplotlib/backends/backend_tkagg.py
I commented out in the show function the line

Tk.mainloop()

In addition to the changes I mentioned in my first email, this has solved my
problem!









On 3/19/07, Rob Clewley <rhc28 at cornell.edu> wrote:
>
> I have the same problem with a similar setup (except Python 2.4.3) and
> have tried the same solutions (BTW those steps really did used to work
> on my machine using Python 2.3.5). In the short term you could either
> try IPython (a proper solution to this problem, which returns me to
> the prompt just fine after closing the figure) or try the following
> "quick and dirty fix" with IDLE:
>
> 1) If your script does stuff other than define classes and functions,
> put in a command that prevents it getting to the calculations (e.g.
> insert a "1/0" line) or, for instance, turn all your calculations into
> function calls that you can easily comment out (temporarily). Run your
> script using F5 so that you just get the prompt.
> 3) Create an empty figure using pylab.figure() or whatever.
> 2) Close the figure and the IDLE console (command prompt window) that
> opened when you ran the script (you have to say Yes when it asks about
> killing a python process).
> 3) This leaves an orphaned python process which you have to clean up
> later using your Task Manager, but ...
> 4) you can now continue to interact with any new IDLE console created
> in the current session when you bring up new figures. i.e. uncomment
> the parts of your script that actually do stuff and run it again.
>
> At least that's a quick fix that's working for me while I await a
> better answer too... Perhaps this hack will outrage someone's
> sensibilities sufficiently that we'll hear of a better IDLE solution.
>
> HTH,
> Rob
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070319/60562de9/attachment.html>


More information about the Python-list mailing list