OpenQuizz
Une application de gestion des contenus pédagogiques
|
Public Member Functions | |
def | __init__ (self, wrapped, convert=None, strip=None, autoreset=False) |
def | should_wrap (self) |
def | get_win32_calls (self) |
def | write (self, text) |
def | reset_all (self) |
def | write_and_convert (self, text) |
def | write_plain_text (self, text, start, end) |
def | convert_ansi (self, paramstring, command) |
def | extract_params (self, command, paramstring) |
def | call_win32 (self, command, params) |
def | convert_osc (self, text) |
Data Fields | |
wrapped | |
autoreset | |
stream | |
strip | |
convert | |
win32_calls | |
on_stderr | |
Static Public Attributes | |
ANSI_CSI_RE | |
ANSI_OSC_RE | |
Implements a 'write()' method which, on Windows, will strip ANSI character sequences from the text, and if outputting to a tty, will convert them into win32 function calls.
def __init__ | ( | self, | |
wrapped, | |||
convert = None , |
|||
strip = None , |
|||
autoreset = False |
|||
) |
def call_win32 | ( | self, | |
command, | |||
params | |||
) |
def convert_ansi | ( | self, | |
paramstring, | |||
command | |||
) |
def convert_osc | ( | self, | |
text | |||
) |
def extract_params | ( | self, | |
command, | |||
paramstring | |||
) |
def get_win32_calls | ( | self | ) |
def reset_all | ( | self | ) |
def should_wrap | ( | self | ) |
True if this class is actually needed. If false, then the output stream will not be affected, nor will win32 calls be issued, so wrapping stdout is not actually required. This will generally be False on non-Windows platforms, unless optional functionality like autoreset has been requested using kwargs to init()
def write | ( | self, | |
text | |||
) |
def write_and_convert | ( | self, | |
text | |||
) |
Write the given text to our wrapped stream, stripping any ANSI sequences from the text, and optionally converting them into win32 calls.
def write_plain_text | ( | self, | |
text, | |||
start, | |||
end | |||
) |
|
static |
|
static |
autoreset |
convert |
on_stderr |
stream |
strip |
win32_calls |
wrapped |