Classes | Functions
leo_fw.utils Namespace Reference

Classes

class  CSIColor
 

Functions

bool is_tool (str name)
 Check whether an executable exists on PATH. More...
 
def parse_yaml (str file_path)
 
str prompt_options (list[tuple[str, Any]] options, int default=1)
 
bool query_yes_no (str question, str default="yes")
 Ask a yes/no question via input() and return their answer. More...
 
def write_flush (str msg)
 Write a message to standard output and flush the buffer. More...
 

Function Documentation

◆ is_tool()

bool leo_fw.utils.is_tool ( str  name)

Check whether an executable exists on PATH.

Parameters
nameName of the executable
Returns
True if executable exists, False otherwise

Definition at line 19 of file utils.py.

◆ parse_yaml()

def leo_fw.utils.parse_yaml ( str  file_path)

Definition at line 79 of file utils.py.

◆ prompt_options()

str leo_fw.utils.prompt_options ( list[tuple[str, Any]]  options,
int   default = 1 
)

Definition at line 63 of file utils.py.

◆ query_yes_no()

bool leo_fw.utils.query_yes_no ( str  question,
str   default = "yes" 
)

Ask a yes/no question via input() and return their answer.

Parameters
questionThe question that is presented to the user.
defaultThe presumed answer if the user just hits <Enter>. It must be "yes" (the default), "no" or None (meaning an answer is required of the user).
Returns
True if the answer is "yes", False otherwise

Definition at line 34 of file utils.py.

◆ write_flush()

def leo_fw.utils.write_flush ( str  msg)

Write a message to standard output and flush the buffer.

Definition at line 28 of file utils.py.



leo_fw
Author(s): Błażej Sowa , Aleksander Szymański
autogenerated on Sat Jul 6 2024 03:05:11