Additionally, you can pass Keyword args: message= Text string to use as the prompt (title of the dialog window). defaultPath= Directory to use as the starting place for file dialog. multiple=True Allows the selection of multiple files.
Displays the file selection dialog for the platform.
Returns a 2-tuple, with the first element being the path to the selected file, and the second being the type of file chosen by the user. If no selection was made, returns (
dabo.ui.getFile() for a more complete description of this function. The only difference between
getFile() is that this function returns the file type selected by the user in addition to the path. So if this function was called as
dabo.ui.getFileAndType("py", "txt"), and the user chose the
Text file option in the file dialog, the function will return
(<file path>, "txt").
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.