11.3.1.5. File management

pymodaq.daq_utils.gui_utils.select_file(start_path='C:\\Data', save=True, ext=None)[source]

Save or open a file with Qt5 file dialog, to be used within an Qt5 loop.

Usage:

from pymodaq.daq_utils.daq_utils import select_file
select_file(start_path="C:\test.h5",save=True,ext='h5')
Parameters Type Description
start_path Path object or str or None, optional the path Qt5 will open in te dialog
save bool, optional
  • if True, a savefile dialog will open in order to set a savefilename
  • if False, a openfile dialog will open in order to open an existing file
ext str, optional the extension of the file to be saved or opened
Returns:the Path object pointing to the file
Return type:Path object

Examples