Why does the IPython interpreter freeze on OS X when launched with --pylab = wx?
I have a python package that uses both wxPython and matplotlib. To get non-blocking windows, I tried to start IPython like this:
# ipython --pylab=wx
When I do that, the IPython prompt appears and a wx icon appears on my OS X pane, but the IPython command line immediately freezes (I need CTRL-Z and end the process to exit). I get the same behavior if I start it with " ipython --pylab
" with the base matplotlib block set to "WX" or "WXAgg" in my matplotlibrc file.
I can start IPython with
# ipython --pylab=osx
But when I run any command that creates a wx window, I get an error stating that I need to create first wx.App
. So to get it to work, I have to start IPython in the mode osx
as above and then immediately type
In [1]: import wx
In [2]: app = wx.App()
I see this on OS X 10.6 with wx 2.9. I get the same behavior whether using Ipython + packages installed natively or via macports. I don't see this behavior when running on RHEL 6.3 with wx 2.8.12.
How can I eliminate the need for this hack and start it right?
source to share
No one has answered this question yet
Check out similar questions: