From d8ac2ffce45be97b3e5c7d428576af43677d5fe6 Mon Sep 17 00:00:00 2001 From: DJE98 Date: Sat, 30 Sep 2023 15:52:10 +0200 Subject: [PATCH] Added custom print functions for cli --- hackathon/cli.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 hackathon/cli.py diff --git a/hackathon/cli.py b/hackathon/cli.py new file mode 100644 index 0000000..f2a5481 --- /dev/null +++ b/hackathon/cli.py @@ -0,0 +1,22 @@ +def print_line(): + print("-----------------------") + +def print_emotions(emotions): + print(f"{len(emotions)} Persons with the following emotions: ") + print(" ".join(emotions)) + print_line() + +def print_connect(address=None): + if address is None: + print(f"Connected") + else: + print(f"Connected with: {address}") + print_line() + +def print_disconnect(address=None): + if address is None: + print(f"Disconnected") + else: + print(f"Disconnected from: {address}") + print_line() + \ No newline at end of file