segfault while getting fig_manager while embedded in Wx

this bit of code:

manager = pylab.get_current_fig_manager()

segfaults when I'm using pylab embedded in Wx.
it works well with gtkAgg.

I'm using it in an event handler, directly taken from the cookbook:
http://www.scipy.org/Cookbook/Matplotlib/Interactive_Plotting

I wonder what I'm doing wrong?
should I access the toolbar states in another way when embedding in Wx?

···

----
This message contains confidential information and may contain information that is legally privileged. If you have received this message by mistake, please immediately notify us and delete the original message. Thank you.

Ce message contient des informations confidentielles. S'il vous est parvenu par erreur, merci de bien vouloir nous en aviser par retour, de n'en faire aucun usage et de n'en garder aucune copie.
----

You cannot import pylab or pyplot is you are embedding mpl in wx
(totally unsupported and expected to fail) -- you need to follow the
patterns in

http://matplotlib.sourceforge.net/examples/user_interfaces/index.html

JDH

···

On Tue, May 19, 2009 at 10:10 AM, guillaume ranquet <granquet@...2572...> wrote:

this bit of code:

manager = pylab.get_current_fig_manager()

segfaults when I'm using pylab embedded in Wx.
it works well with gtkAgg.

I'm using it in an event handler, directly taken from the cookbook:
http://www.scipy.org/Cookbook/Matplotlib/Interactive_Plotting

I wonder what I'm doing wrong?
should I access the toolbar states in another way when embedding in Wx?

John Hunter wrote:

You cannot import pylab or pyplot is you are embedding mpl in wx
(totally unsupported and expected to fail) -- you need to follow the
patterns in

http://matplotlib.sourceforge.net/examples/user_interfaces/index.html

or use wxMPL:

http://agni.phys.iit.edu/~kmcivor/wxmpl/

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...

Christopher Barker wrote:

John Hunter wrote:

You cannot import pylab or pyplot is you are embedding mpl in wx
(totally unsupported and expected to fail) -- you need to follow the
patterns in

http://matplotlib.sourceforge.net/examples/user_interfaces/index.html

or use wxMPL:

http://agni.phys.iit.edu/~kmcivor/wxmpl/

-Chris

I feel like I could have found out by myself xD
thanks !

···

----
This message contains confidential information and may contain information that is legally privileged. If you have received this message by mistake, please immediately notify us and delete the original message. Thank you.

Ce message contient des informations confidentielles. S'il vous est parvenu par erreur, merci de bien vouloir nous en aviser par retour, de n'en faire aucun usage et de n'en garder aucune copie.
----