ilex.logging

break_str(pstr, bw=70, return_list=False)[source]

Break up string into segments

Parameters:
  • pstr (str) – string to break up

  • bw (int) – width of line before break

check_verbosefile()[source]

Check if verbose file exists, else create new one

get_filepath(file)[source]

Get filepath of verbose file

get_verbose()[source]

Get verbose parameter

log(pstr, stype='log', lpf=True, lpf_col='None', end='\n')[source]

Logging function, used to replace the python ‘print’ function with extra functionality for ILEX

Parameters:
  • pstr (str) – string to print

  • stype (str, optional) –

    type of message to print, by default “log”

    [log] - Normal print, shown in white

    [warn] - Warn message, shown in yellow

    [err] - Error message, shown in red

  • lpf (bool, optional) – If true, the message will also label the parent function of the log function call, by default True

  • lpf_col (str, optional) – Color to label parent function, by default ‘None’

log_title(pstr, col='None')[source]

Logging function for showing title of executed function

Parameters:
  • pstr (str) – string to print

  • col (str) – color to print

set_verbose(verbose)[source]

Set verbose parameter

show_terminal_cols()[source]

Print out avaliable colors for terminal printing

strcol(string: str, col: str)[source]

Wrap string in color for terminal printing

Parameters:
  • string (str) – string to color wrap

  • col (str) – color, run show_terminal_colors to check avaliable colors