[IPython-dev] Open-file dialog in the notebook for data files

Antonino Ingargiola tritemio at gmail.com
Wed Dec 17 14:37:55 EST 2014


Dear ipython developers,

I occasionally have the need to get a data file name via a GUI dialog when
using the notebook.

Opening a QT dialog from the notebook involves initializing the QT gui. At
the same time I always use inline plots so I also need to enable the inline
plot backed. This can be done with

    %gui qt
    %matplotlib inline

These commands work when executed manually on different cells.
However, the previous commands will freeze the ipython notebook if they are
in the same cell or if executing the notebook with Run-All (open issue #5798
<https://github.com/ipython/ipython/issues/5798>). The problem is
multi-platform and occurs both with PySide and PyQT.

Is there any workaround for this? It really bothers me to lose the ability
to Run-All when I enable the QT gui.

Alternatively would be possible to use a javascript dialog to select a file
on the filesystem? If yes an example would be nice.

PS: I'm using ipython 2.x

Thanks,
Antonio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20141217/ada73526/attachment.html>


More information about the IPython-dev mailing list