flower_box.py module.
flower_box¶
With print_flower_box_msg you can print messages in a flower_box like this:
- Example
print a one line message in a flower box
>>> from scottbrian_utils.flower_box import print_flower_box_msg
>>> print_flower_box_msg('This is my message to the world')
***********************************
* This is my message to the world *
***********************************
-
flower_box.print_flower_box_msg(msgs, *, end='\\n', file=None, flush=False)¶ Print a single or multi-line message inside a flower box (asterisks).
- Parameters
msgs (
Union[str,List[str]]) – single message or list of messages to printend (
str) – Specifies the argument to use on the print statement end parameter. The default is ‘\n’.file (
Optional[TextIO]) – Specifies the argument to use on the print statement file parameter. The default is sys.stdout (via None).flush (
bool) – Specifies the argument to use on the print statement flush parameter. The default is False.
- Example
print a two line message in a flower box
>>> from scottbrian_utils.flower_box import print_flower_box_msg
>>> msg_list = ['This is my first line test message', 'and my second line'] >>> print_flower_box_msg(msg_list) ************************************** * This is my first line test message * * and my second line * **************************************
- Return type
None