[IPython-user] threaded ipython shell
Fri May 8 14:02:58 CDT 2009
2009/5/6 Robert Cimrman <firstname.lastname@example.org>:
> Hi Fernando,
> sorry to bother you personally, but I got no answer to , and am curious
> what you think about it. Simple answer like "no, it is not possible" will do
> perfectly. :-) It's not a top priority issue for me right now, but I would
> like to know whether to struggle in that direction or not...
No worries, I've been terrible at keeping up with public email due to
a massive set of grant deadlines over the last few weeks, sorry about
>  [IPython-user] how to run threaded ipython shell via API?, from
> I am playing with a customized ipython shell a la isympy, which I have
> taken as a start. I have tweaked it into what I call isfepy and it runs
> pretty well, for example:
> In : pb, vec, data = pde_solve('input/poisson.py')
> In : view = Viewer(pb.get_output_name())
> In : view()
>  solves a Poisson equation in 3D by the finite elements, 
> constructs a mayavi2 viewer, and  displays the results using the
> mayavi's mlab.show()
> Now back to the subject - is it possible to make view() non-blocking?
> Currently the shell waits till the mayavi2 window is closed.
> I have tried running './isfepy -- -pylab' and similar options (-*thread)
> which were passed into IPython.Shell.make_IPython(), but it did not do
> what I had expected: there were no matplotlib symbols imported, and both
> pylab.show(), and mlab.show() blocked. The same holds for isympy by the way.
> thanks for ipython, cheers!
> Robert Cimrman
> PS: to try it (not easy yet!), do:
> $ git clone git://github.com/rc/sfepy.git
> $ cd sfepy
> $ git checkout -b isfepy origin/isfepy
This is pretty easy to do:
"""Simple customized ipython that specifically loads WX thread support"""
# Shell class options (the last one is plain, unthreaded ipython):
# IPShellGTK, IPShellWX, IPShellQt, IPShellQt4, IPShell
from IPython.Shell import IPShellWX
banner ="Welcome to the SFEPy IPython-based shell with Wx support!\n"
ipwx = IPShellWX()
I hope this helps,
More information about the IPython-user