qxf2-page-object-model icon indicating copy to clipboard operation
qxf2-page-object-model copied to clipboard

Add method to print coloured text

Open shivahari opened this issue 4 months ago • 0 comments

We use print statements in except blocks to display exception information on the console. Printing the info in white is not very useful.

print_statement_in_white_text

Add a method to the LoggingObject object to print a text in red:

>>> def red_text(text):
...     return '\033[91m'+text+'\033[0m'
...

And use it in print statement as:

print_text_in_red

shivahari avatar Oct 15 '24 06:10 shivahari