sidpy.io.interface_utils.openfile_dialog_qt

sidpy.io.interface_utils.openfile_dialog_qt(file_types='All files (*)', multiple_files=False, file_path='.', caption='Select a file...')[source]

Opens a File dialog which is used in open_file() function This function uses pyQt5.

Parameters:
  • file_types (str, optional. Default = all) – types of files accepted

  • multiple_files (bool, optional. Default = False) – Whether or not multiple files can be selected

  • file_path (str, optional. Default = '.') – path to starting or root directory

  • caption (str, optional. Default = "Select a file...") – caption of the open file dialog

Returns:

filename – full filename with absolute path and extension

Return type:

str

Notes

In jupyter notebooks use %gui Qt early in the notebook.

Examples

>> import sidpy as sid >> filename = sid.io.openfile_dialog() >> print(filename)