|
From: Jeremy O'D. <je...@o-...> - 2004-06-08 05:48:14
|
Hello Kirill, I'm the WX maintainer for Matplotlib, so hopefully can cover a couple of your issues with WX. > WX/WXAgg -- both don't work from console -- show empty window, cursor > turns in hourglass when it is over plot window. From GUI app > (IDLE/PythonWin) it seems to work at first glance -- plot gets created, > but the plot window can not be closed with either Alt-F4 or mouse. It > just does not react on close command. Moreover, python objects > corresponding to window seems to get destroyed when I try to close > window, because if I do few plots commands without trying to close the > window, new plots appear in first window, however as soon as I try to > close the window (it won't close, remember?), new plots will open new > window. That second window can be closed, but first one still remain > unclosable. I'm assuming that you're running from the console in the recommended way (i.e pythonw file.py -dWX). I am not surprised that you are having problems running the Wx backend from Idle and/or PythonWin. It is generally problematic to launch a GUI app from an application which uses a different GUI backend (e.g a Wx app from Idle (which is Tk)) as the event loops get in each others' way. There are a few things I have to fix in the window close code for Wx anyway (it's broken in some respects) - for the moment the recommended way is to use the 'close window' button. I tend to prefer to use the PyCrust console for Wx (it's part of the Wx distribution) However, I'm quite concerned that launching from the Windows console causes problems. It should work correctly, provided that python is on the path and WxPython is installed correctly in site-lib. > Any ideas how that can be fixed, work arounded, debugged? I am pretty > comfortable with debugging Python code, but as I said I don't have C > compiler yet, so can't debug extensions. I'd recommend boa-constructor (http://boa-constructor.sourceforge.net) for debugging Wx code. It's a pretty decent IDE, contains the best debugger I've yet found for Python, and is based on the Wx toolkit, so doesn't have the event loop issue mentioned above. Good luck Jeremy |