select_file

class camelot.view.action_steps.select_file.SelectFile(file_name_filter='')[source]

Select one or more files to open or to process.

Parameters:file_name_filter – Filter on the names of the files that can be selected, such as ‘All files (*)’. See QtGui.QFileDialog for more documentation.
single

defaults to True, set to False if selection of multiple files is allowed

existing

defaults to True, set to False if non existing files are allowed (to save something)

The yield statement of SelectFile returns a list of selected file names. This list has only one element when single is set to True. Raises a camelot.core.exception.CancelRequest when no file was selected.

../../../_images/select_file.png

This action step stores its last location into the QtCore.QSettings and uses it as the initial location the next time it is invoked.

render(directory=None)[source]

create the file dialog widget. this method is used to unit test the action step.

Parameters:directory – the directory in which to open the dialog, None to use the default

Previous topic

print_preview

Next topic

select_object

This Page