[SciPy-User] matlab "uigetfile" analog for ipython

Antonino Ingargiola tritemio at gmail.com
Mon Jul 14 12:17:49 EDT 2014


Hi,

I use to define a function that uses Qt (either PySide or PyQt) to open a
dialog:

try:
    from PySide import QtCore, QtGui
except ImportError:
    from PyQt4 import QtCore, QtGui

def gui_fname(dir=None):
    """Select a file via a dialog and returns the file name.
    """
    if dir is None: dir ='./'
    fname = QtGui.QFileDialog.getOpenFileName(None, "Select data file...",
            dir, filter="All files (*)")
    return fname[0]


Antonino


On Sun, Jul 13, 2014 at 4:27 AM, Hjalmar Turesson <hturesson at gmail.com>
wrote:

> Hi,
>
> I used tkFileDialog for that type of thing.
>
> Hjalmar
>
>
> On Fri, Jul 11, 2014 at 9:39 AM, Antonelli Maria Rosaria <
> maria-rosaria.antonelli at curie.fr> wrote:
>
>>   Hi,
>>
>>  Is there any way to select interactively the folder/directory where are
>> stored the data that I want to analyse in my notebook.
>> Matlab command should be 'uigetfile'. This open a window and I select the
>> file I want from this window.
>>
>>  Thank you very much.
>> Best,
>> Rosa
>>
>> _______________________________________________
>> SciPy-User mailing list
>> SciPy-User at scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-user
>>
>>
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20140714/105a1e16/attachment.html>


More information about the SciPy-User mailing list