On Sat, Jul 19, 2008 at 03:42:27PM -0500, John Hunter wrote:
> On Sat, Jul 19, 2008 at 1:05 AM, Gael Varoquaux
> <[EMAIL PROTECTED]> wrote:

> > It turns out it was only in the GTK backend, and quite trivial to
> > correct. Attached is a new patch, including this correction.

> Hey Gael, this is starting to look reasonable.  I know implementing
> these checks, such as detecting whether the mainloop is active, can be
> a hassle, so thanks for taking the time to write against so many
> environments.  We may want to make take the logic you've provided and
> encapsulate them in the backend methods to make them more easily
> recognizable, fixable and reusable.  Eg, each unser interface backend
> would provide a "mainloop_running" method.  You could then access this
> in pyplot to support your fallback logic, and also we could use it in
> "show" to make sure we don't try and start mainloops that are already
> running.

In theory this could work, but the problem is that the logics for
selecting the backend gets executed when matplotlib.backends is imported,
ie before importing any backend. I tried implementing your suggestion,
but it failed because I had to imports from backends. Am I missing
something obvious?

> One thing notice in your patch is that when it comes time to check for
> tk, you import tkinter and then do nothing with it.  I assume this is
> a placeholder until you figure out what you want to do?

I have actually given up on that, so you should probably remove these two
lines. If somebody knows how to check accurately for tk, I am interested.

Cheers,

Gaƫl

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to