8.13.2 FileSelection class: A file selection dialog widget.

You can specify a default path/filename that will be suggested initially. If a pattern is specified, only matching files will be shown. A pattern can be something like 'Images (*.png *.jpg)' or a list of such strings. Default mode is to accept any filename. You can specify exist=True to accept only existing files. Or set exist=True and multi=True to accept multiple files. If dir==True, a single existing directory is asked.

The FileSelection class has this constructor:

class FileSelection( path,pattern=None,exist=False,multi=False,dir=False)
The constructor shows the widget.

FileSelection objects have the following methods:

getFilename( )
Ask for a filename by user interaction.

Return the filename selected by the user. If the user hits CANCEL or ESC, None is returned.