From 2f9dce4f1929ad018e575b3d51319bce0c441538 Mon Sep 17 00:00:00 2001 From: Digital Studium Date: Wed, 24 Apr 2024 08:27:26 +0300 Subject: [PATCH] Remove artefacts --- test.py | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 test.py diff --git a/test.py b/test.py deleted file mode 100644 index ef9601c..0000000 --- a/test.py +++ /dev/null @@ -1,23 +0,0 @@ -import curses -import time -import threading - -def inactive_function(): - # This function will be executed while the screen is inactive - print("Screen is inactive, doing some work...") - # Do some work here, e.g., update a database, send a notification, etc. - time.sleep(5) # simulate some work being done - print("Work done!") - -def main(screen): - screen.nodelay(True) # don't wait for input - threading.Thread(target=inactive_function).start() # start the inactive function in a separate thread - while True: - screen.clear() - screen.addstr(0, 0, f"{time.time()}") - time.sleep(1) - screen.refresh() - if screen.getch() != -1: # if there's input, exit - break - -curses.wrapper(main)