bootstack.ask_save_file#

bootstack.ask_save_file(*, title='', initial_file='', initial_dir='', file_types=None, default_extension='', parent=None)#

Show a native save dialog and return the chosen path.

Parameters:
  • title (str) – Dialog window title.

  • initial_file (str) – Suggested file name.

  • initial_dir (str) – Directory to open in. Defaults to the last used location.

  • file_types (list[tuple[str, str]] | None) – Selectable file types as (label, pattern) pairs, for example [('PNG image', '*.png'), ('All files', '*.*')].

  • default_extension (str) – Extension appended when the user omits one (for example '.png').

  • parent (Any) – Parent widget. Defaults to the active root window.

Returns:

The chosen file path, or None if canceled.

Return type:

str | None