-
Notifications
You must be signed in to change notification settings - Fork 0
vtf iosys gates
srccircumflex edited this page Jan 6, 2023
·
4 revisions
The module provides the possibility to switch some escape sequences of the framework on and off centrally.
For example, the future creation of new SGR sequences in runtime can be switched off via:
>>> __STYLE_GATE__.disable()
class gates.__DECPM_GATE__ = Gate() ¶
This gate is adapted to the methods in factory class DECPrivateMode.
After the deactivation, the methods return an empty EscSegment (<EscSegment("")>
).
class gates.__STYLE_GATE__ = Gate() ¶
This gate is adapted to some factory methods of "non-functional" escape sequences in os and cursor;
and to the Types in sgr.
After the deactivation, the methods and types return an empty EscSegment (<EscSegment("")>
).
class gates.Gate ¶
A wrapper class for a decorator that executes the function or an alternative depending on
self.status
(control viaenable
|disable
|destroy
).
- Statuses:
True
: enabledNone
: disabledFalse
: permanently disabled (destroyed)state: bool | None
__bool__() -> bool ¶
bool(self.state)
__call__(alt=lambda cls, *args, **kwargs: str()) -> Callable[ [...], ...] ¶
The wrapper function.destroy() -> None ¶
Setstatus
toFalse
, future executions ofenable
|disable
have no effect in runtime.disable() -> bool ¶
Setstatus
toNone
, the alternative function will be executed. Return whether the gate is not permanently disabled.enable() -> bool ¶
Setstatus
toTrue
, the original function will be executed. Return whether the gate is not permanently disabled.wrapper(alt=lambda cls, *args, **kwargs: str()) -> Callable[ [...], ...] ¶
The wrapper function.
Date: | 11 Nov 2022 |
---|---|
Version: | 0.1 |
Author: | Adrian Hoefflin [srccircumflex] |
Doc-Generator: | "pyiStructure-RSTGenerator" <prototype> |