FilesFullPaths
- class lib.cli.actions.FilesFullPaths(*args, filetypes: str | None = None, **kwargs)
Bases:
FileFullPathsAdds support for a File browser to select multiple files in the GUI.
This extends the standard
argparse.Actionand adds an additional parameterfiletypes, indicating to the GUI that it should pop a file browser, and limit the results to the file types listed. Multiple files can be selected for opening, so thenargsparameter must be set. As well as the standard parameters, the following parameter is required:- Parameters:
filetypes (str) – The accepted file types for this option. This is the key for the GUIs lookup table which can be found in
lib.gui.utils.FileHandler
Example
>>> argument_list = [] >>> argument_list.append(dict( >>> opts=("-f", "--images"), >>> action=FilesFullPaths, >>> filetypes="image", >>> nargs="+"))
Methods Summary
__call__(parser, namespace, values[, ...])Call self as a function.
Methods Documentation
- __call__(parser, namespace, values, option_string=None) None
Call self as a function.
- Return type:
None
- format_usage()