Skip to content

FileDialog

Canonical path: NemAll_Python_Utility.FileDialog

File dialog

Methods:

AskOpenFavoriteFile staticmethod

AskOpenFavoriteFile(
    defaultPath: str, title: str, filters: str, extension: str
) -> str

Ask for a favorite file to open

Parameters:

  • defaultPath (str) –

    Initial default path

  • title (str) –

    Title of the dialog. If the title is empty an internal string will be used

  • filters (str) –

    Filters of the files

  • extension (str) –

    Extension of the file

Returns:

  • str

    selected file

AskOpenFile staticmethod

AskOpenFile(
    defaultPath: str,
    title: str,
    filters: str,
    extension: str,
    defaultDir: DefaultDirectories,
) -> str

Ask for a file to open

Parameters:

  • defaultPath (str) –

    Initial default path

  • title (str) –

    Title of the dialog. If the title is empty an internal string will be used

  • filters (str) –

    Filters of the files

  • extension (str) –

    Extension of the file

  • defaultDir (DefaultDirectories) –

    Default directories

Returns:

  • str

    selected file

AskSaveFavoriteFile staticmethod

AskSaveFavoriteFile(
    defaultPath: str, title: str, filters: str, extension: str
) -> str

Ask for a favorite file to save

Parameters:

  • defaultPath (str) –

    Initial default path

  • title (str) –

    Title of the dialog. If the title is empty an internal string will be used

  • filters (str) –

    Filters of the files

  • extension (str) –

    Extension of the file

Returns:

  • str

    selected file

AskSaveFile staticmethod

AskSaveFile(
    defaultPath: str,
    title: str,
    filters: str,
    extension: str,
    defaultDir: DefaultDirectories,
) -> str

Ask for a file to save

Parameters:

  • defaultPath (str) –

    Initial default path

  • title (str) –

    Title of the dialog. If the title is empty an internal string will be used

  • filters (str) –

    Filters of the files

  • extension (str) –

    Extension of the file

  • defaultDir (DefaultDirectories) –

    Default directories

Returns:

  • str

    selected file

__init__

__init__()

Initialize