euporie.core.filters

Define common filters.

Module Attributes

insert_mode

Determine if any binding style is in replace mode.

Functions

command_exists(*cmds)

Verify a list of external commands exist on the system.

have_modules(*modules)

Verify a list of python modules are importable.

import_module(name[, package])

Import a module.

reduce(function, iterable[, initial])

Apply a function of two arguments cumulatively to the items of a sequence or iterable, from left to right, so as to reduce the iterable to a single value.

scrollable(window)

Return a filter which indicates if a window is scrollable.

to_filter(bool_or_filter)

Accept both booleans and Filters as input and turn it into a Filter.

which(cmd[, mode, path])

Given a command, mode, and a PATH string, return the path which conforms to the given mode on the PATH, or None if there is no such file.

Classes

Condition(func)

Turn any callable into a Filter.

EditingMode(value[, names, module, ...])

MicroInputMode(value[, names, module, ...])

Enum to define edit mode state types.

partial

partial(func, *args, **keywords) - new function with partial application of the given arguments and keywords.

euporie.core.filters.command_exists(*cmds: str) Filter

Verify a list of external commands exist on the system.

euporie.core.filters.have_modules(*modules: str) Filter

Verify a list of python modules are importable.

euporie.core.filters.insert_mode = Condition(<function vi_mode>)&Condition(<function vi_insert_mode>)|Condition(<function emacs_mode>)&Condition(<function emacs_insert_mode>)|Condition(<function micro_mode>)&Condition(<function micro_insert_mode>)

Determine if any binding style is in replace mode.

euporie.core.filters.scrollable(window: Window) Filter

Return a filter which indicates if a window is scrollable.