From ae1304e929482c749e5982788a4604fe825520ab Mon Sep 17 00:00:00 2001 From: Calum Andrew Morrell Date: Tue, 27 Aug 2024 17:26:37 +0100 Subject: [PATCH] added platform independent screen clear function --- dg_clt/screen.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 dg_clt/screen.py diff --git a/dg_clt/screen.py b/dg_clt/screen.py new file mode 100644 index 0000000..65d8b81 --- /dev/null +++ b/dg_clt/screen.py @@ -0,0 +1,6 @@ +import os +import subprocess + + +def clear(): + subprocess.call('clear' if os.name == 'posix' else 'cls')