OK, thanks. I got the same behavior using Python (instead of ipython).
Non-interactive usage has not yet been implemented in the MacOSX backend. We should be able to fix the bug that you found when implementing interactive/non-interactive usage for the MacOSX backend.


--- On Wed, 3/23/11, Daniel Welling <dantwelling@gmail.com> wrote:

From: Daniel Welling <dantwelling@gmail.com>
Subject: Re: [Matplotlib-users] Qt4 on OSX
To: "Michiel de Hoon" <mjldehoon@yahoo.com>
Cc: matplotlib-users@lists.sourceforge.net
Date: Wednesday, March 23, 2011, 12:27 PM

Greetings again, Michiel.  Please excuse my slow response time...

First, thanks for explaining the Framework stuff; it clarifies situation.  I'll be sure to never blame the OSX backend where it is not warranted!

Unfortunately (in terms of easy explanations):
In [3]: MacOS.WMAvailable()
Out[3]: True


Fortunately, I've been able to nail down the problem:
bash-3.2$ ipython
Python 2.6.6 (r266:84292, Jan 18 2011, 14:07:55) 
Type "copyright", "credits" or "license" for more information.

IPython 0.10.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object'. ?object also works, ?? prints more.

In [2]: import matplotlib.pyplot as plt
In [3]: plt.plot([0,1])
Out[3]: [<matplotlib.lines.Line2D object at 0x118c6be90>]
In [4]: plt.show()
(Here, saving the plot works like normal.)
In [5]: plt.ion()
In [6]: plt.plot([0,1])
Out[6]: [<matplotlib.lines.Line2D object at 0x118c8bc90>]
(Now, when trying to save the plot, the "save" and "cancel" buttons no longer respond.  I must kill python from another terminal.)

So that's the situation with OSX.  It's something that comes up frequently enough (typically a quick plot turns into a more thorough customization followed by the lockup) that TK becomes a more viable option for me though OSX is faster and has better file navigation features.  Again, if QT4 was working, that is certainly my weapon of choice...

On Mon, Mar 21, 2011 at 7:14 AM, Michiel de Hoon <mjldehoon@yahoo.com> wrote:
--- On Sun, 3/20/11, Daniel Welling <dantwelling@gmail.com> wrote:
> The OSX backend used to have a bug where you cannot type a
> name in the file name text box.Since that has been fixed, ...
That was not a bug in the MacOSX backend (and therefore was not fixed), but is related to how Python is installed on your system: If your Python is not a framework installation, it will not interact correctly with Apple's windowing manager. This is due to OS X itself and is independent of the MacOSX backend.

I have found a new bug: every so often, when you go to save a file, the "save" and "cancel" button stop responding, trapping the user in file saving limbo.  I'll have to play with it again to figure out what triggers this.
Can you check if your Python is built as a framework? If it is, MacOS.WMAvailable() should return True:

$ python
Python 2.7.1 (r271:86832, Mar 12 2011, 13:44:53)
[GCC 4.0.1 (Apple Computer, Inc. build 5370)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import MacOS
>>> MacOS.WMAvailable()