urgent - Matplolib with IDLE!
Dear all, I've just started using Matplotlib and I'm trying to make it work in IDLE. Other people have reported the same problem as I'll refer, but I've tried some solutions that I found in the web and I haven't succeded. Every time I produce a figure, I can't get the IDLE prompt active again after closing that figure. I've tried the following: - in site-pachages/matplotlib/backends/backend_tkagg.py I've uncommented the line #os.environ['PYTHONINSPECT'] = '1' - I've changed to the interactive mode, i.e I've set interactive=True in share/matplotlib/.matplotlibrc - I've started IDLE with the -n flag I would sincerely appreciate your help, because I must finish some work very very soon and I'm going crazy with this issue... By the way, I'm using - windows XP - matplotlib-0.90.0.win32-py2.5 - numpy-1.0.1.win32-py2.5 - python 2.5 Te -- http://mail.python.org/mailman/listinfo/python-list
Re: urgent - Matplolib with IDLE!
Dear Ana, 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 -- http://mail.python.org/mailman/listinfo/python-list
Re: urgent - Matplolib with IDLE!
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 <[EMAIL PROTECTED]> 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 -- http://mail.python.org/mailman/listinfo/python-list