[IPython-dev] mayavi with ipython
Fernando Perez
fperez.net at gmail.com
Sat Sep 10 15:35:55 EDT 2011
On Sat, Sep 10, 2011 at 11:39 AM, Satrajit Ghosh <satra at mit.edu> wrote:
> we would like to launch a simple interactive mayavi window.
>
> ---
> from mayavi import mlab
> mlab.test_mesh()
> mlab.show()
> ---
>
> but we would like this to launch from the terminal and return us an ipython
> prompt so that we can interact with the objects. unfortunately, we don't
> understand the event loop interactions too well.
>
> any ideas on how to achieve this?
One way:
1. put the code into a script, but do NOT call show() (which blocks):
amirbar[~]> cat mv.py
from enthought.mayavi import mlab
mlab.test_mesh()
2. Start it as
ipython --gui wx -i mv.py
Cheers,
f
More information about the IPython-dev
mailing list