Please help me with this.
My situation is that I have a tkinter GUI. When I click a button on the GUI, it invokes a function A implemented in the GUI and runs another function B in another package. Now, since function B implements time.sleep() for 15 mins if some condition is met, I'm wondering if there is a way that I can output a message in the GUI window when function B is paused so that the user of the GUI knows that the program is not down.
Here is a simplified example. GUI is defined in a class:
from tkinter import *
from pk1 import funcB
class scrapApp(Tk):
def __init__(self):
super().__init__()
def funcA(self):
funcB(self)
def funcC():
print("dddddd")
if __name__ == "__main__":
app = scrapApp()
app.mainloop()
funcB in pk1
def funcB(a):
if ("something happens" == True):
a.funcC()
time.sleep(15*60)
Please advise. Thanks a lot.