Signature:

dabo.ui.getFile(*args, **kwargs)

Description:

Displays the file selection dialog for the platform.

Returns:

Returns the path to the selected file, or None if no selection was made.

Comments:

The reason that getFile() has the unspecified parameter list is that it is extremely flexible in how you specify the file types you want the dialog to display. It can take a single named parameter of wildcard, or you can pass in as many file extensions as you like. If the file extensions are among the types that Dabo understands, you will get a full descriptive name along with the extension. If you pass multiple extensions, the dialog's file type selector will contain an entry for each type you pass.

Understood File Extensions:

Additionally, you can pass Keyword args:

Examples:

dabo.ui.getFile("*", defaultPath=".") - Displays all files in current directory.

dabo.ui.getFile("py", "*") - Displays either just Python scripts, or all files.

dabo.ui.getFile("png", "jpg", "gif") - Allows the user to select from any of these three graphic formats. See the screenshot below: