|
grepros 1.3.0
grep for ROS bag files and live topics
|

Public Member Functions | |
| configure (cls, color=True, apimode=False) | |
| debug (cls, text="", *args, **kwargs) | |
| error (cls, text="", *args, **kwargs) | |
| flush (cls) | |
| init_terminal (cls) | |
| log (cls, level, text="", *args, **kwargs) | |
| print (cls, text="", *args, **kwargs) | |
| warn (cls, text="", *args, **kwargs) | |
Public Attributes | |
| APIMODE | |
| WIDTH | |
Static Public Attributes | |
| bool | APIMODE = False |
| Whether logging debugs and warnings and raising errors, instead of printing. | |
| COLOR = None | |
| Whether using colors in output. | |
| DEBUG_END | |
| DEBUG_START | |
| ERROR_END | |
| ERROR_START | |
| dict | PRINTS = {} |
| {sys.stdout: number of texts printed, sys.stderr: ..} | |
| str | STYLE_ERROR = "\x1b[31m\x1b[2m" |
| str | STYLE_HIGHLIGHT = "\x1b[31m" |
| str | STYLE_LOWLIGHT = "\x1b[38;2;105;105;105m" |
| str | STYLE_RESET = "\x1b(B\x1b[m" |
| str | STYLE_SPECIAL = "\x1b[35m" |
| str | STYLE_SPECIAL2 = "\x1b[36m" |
| str | STYLE_WARN = "\x1b[33m" |
| WARN_END | |
| WARN_START | |
| int | WIDTH = 80 |
| Console width in characters, updated from shutil and curses. | |
Prints to console, supports color output. If configured with `apimode=True`, logs debugs and warnings to logger and raises errors.
| configure | ( | cls, | |
color = True, |
|||
apimode = False |
|||
| ) |
Initializes printer, for terminal output or library mode.
For terminal output, initializes terminal colors, or disables colors if unsupported.
@param color True / False / None for auto-detect from TTY support;
will be disabled if terminal does not support colors
@param apimode whether to log debugs and warnings to logger and raise errors,
instead of printing
| debug | ( | cls, | |
text = "", |
|||
| * | args, | ||
| ** | kwargs | ||
| ) |
| error | ( | cls, | |
text = "", |
|||
| * | args, | ||
| ** | kwargs | ||
| ) |
| init_terminal | ( | cls | ) |
| log | ( | cls, | |
| level, | |||
text = "", |
|||
| * | args, | ||
| ** | kwargs | ||
| ) |
| ( | cls, | ||
text = "", |
|||
| * | args, | ||
| ** | kwargs | ||
| ) |
Prints text, formatted with args and kwargs.
@param __file file object to print to if not sys.stdout
@param __end line end to use if not linefeed "\n"
@param __once whether text should be printed only once
and discarded on any further calls (applies to unformatted text)
| warn | ( | cls, | |
text = "", |
|||
| * | args, | ||
| ** | kwargs | ||
| ) |
|
static |
|
static |
|
static |