FilenameCompleter
-
class FilenameCompleter(**properties: Any)
Superclasses: Object
Completes partial file and directory names given a partial string by
looking in the file system for clues. Can return a list of possible
completion strings for widget implementations.
Constructors
-
class FilenameCompleter
-
classmethod new() → FilenameCompleter
Creates a new filename completer.
Methods
-
class FilenameCompleter
-
do_got_completion_data(self) → None
-
get_completion_suffix(initial_text: str) → str | None
Obtains a suffix completion for initial_text from completer.
Suffix will be an empty string if there’s no shared suffix among matching
completions. If there’s no matching completions anyway, NULL is returned.
- Parameters:
initial_text – text to be completed.
-
get_completions(initial_text: str) → list[str]
Gets an array of completion strings for a given initial text.
- Parameters:
initial_text – text to be completed.
-
set_dirs_only(dirs_only: bool) → None
If dirs_only is True, completer will only
complete directory names, and not file names.
This function needs to be called before waiting for results from the
completer to be populated.
- Parameters:
dirs_only – a gboolean.
Signals
-
class FilenameCompleter.signals
-
got_completion_data() → None
Emitted when the file name completion information comes available.
Virtual Methods
-
class FilenameCompleter
-
do_got_completion_data() → None