|
From: Matt N. <new...@ca...> - 2005-02-16 20:11:28
|
I haven't tried wxPython with Python2.4, but with WinXP,
Python 2.3.2, wxPython 2.5.3.1, and matplotlib 0.72.0,
embedding_in_wx.py
embedding_in_wx2.py
embedding_in_wx3.py
all work ok for me. For completeness,
embedding_in_wx4.py
fails:
Traceback (most recent call last):
File "embedding_in_wx4.py", line 22, in ?
from matplotlib.numerix import rand
ImportError: cannot import name rand
but replacing
from matplotlib.numerix import rand
with
from matplotlib.numerix.random_array import random as rand
fixes that problem. I think embedding_in_wx4.py has some other
problems (Toolbar2 is not visible without a resize, the window
does not respond to all events, including closing the window),
but that's a separate topic.
I agree with John's assessment that the original poster probably
had a bad install of wx. Does the wx demo run ok?? Do any other
matplotlib examples run? If so, another suggestion would be to
try to replace MyApp(0) with PySimpleApp(0).
Hope that helps,
--Matt
|