euporie.core.utils

Miscellaneou utility classes.

Functions

dict_merge(target_dict, input_dict)

Merge the second dictionary onto the first.

on_click(func)

Return a mouse handler which call a given function on click.

overload(func)

Decorator for overloaded functions/methods.

run_in_thread_with_context(func, *args[, daemon])

Run a function in an thread, but make sure it uses the same contextvars.

Classes

ChainedList(*lists)

A list-like class which chains multiple lists.

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

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

Thread([group, target, name, args, kwargs, ...])

A class that represents a thread of control.

TypeVar(name, *constraints[, bound, ...])

Type variable.

chain

chain(*iterables) --> chain object

class euporie.core.utils.ChainedList(*lists: Iterable[T])

Bases: Sequence[euporie.core.utils.T]

A list-like class which chains multiple lists.

count(value) integer -- return number of occurrences of value
property data: list[T]

Return the list data.

index(value[, start[, stop]]) integer -- return first index of value.

Raises ValueError if the value is not present.

Supporting start and stop arguments is optional, but recommended.

euporie.core.utils.dict_merge(target_dict: dict, input_dict: dict) None

Merge the second dictionary onto the first.

euporie.core.utils.on_click(func: Callable) MouseHandler

Return a mouse handler which call a given function on click.

euporie.core.utils.run_in_thread_with_context(func: Callable, *args: Any, daemon: bool = True, **kwargs: Any) None

Run a function in an thread, but make sure it uses the same contextvars.

This is required so that the function will see the right application.