campy.graphics.gfilechooser module¶
Show graphical dialog boxes that ask the user to select a file.
These dialog boxes come in two flavors:
- Open: Select a file to open.
- Save: Select a file to save.
In each case, the filename is returned, or None if the user closed the dialog.
-
campy.graphics.gfilechooser.
show_open_dialog
(directory='/Users/sredmond')[source]¶ Show the user a dialog asking for a file to open.
Parameters: directory (pathlib.Path or str) – The initial directory displayed in the dialog. Returns: The filename of the user-selected file, or None if the dialog was cancelled.
-
campy.graphics.gfilechooser.
show_save_dialog
(directory='/Users/sredmond')[source]¶ Show the user a dialog asking for a file to save.
Parameters: directory (pathlib.Path or str) – The initial directory displayed in the dialog. Returns: The filename of the user-selected file, or None if the dialog was cancelled.