Open abzlrz opened 6 years ago
The app GUI always freezes after running a method with toast notif in it... idk but you may give yourself a try... this method is a member of a tkinter toplevel class which i invoke when user clicks a button
def mymethod(self): hs = generate_hash() newpath = f'..\\results\\results{hs}\\' os.makedirs(newpath) X = readall_images(self.inputvar.get()) saveall_images(X, newpath, "") opennotif(newpath, "Done", "open it!") self.inputvar.set("") X = None
on the top on it, I import a function I made dedicated for toast notification... the function looks like this:
def opennotif(dir, header, msg): tst = ToastNotifier() res = tst.show_toast(str(header), str(msg)) if res is True: os.system(f'explorer "{dir}"')
use the threaded option tst.show_toast(str(header), str(msg), threaded=True)
tst.show_toast(str(header), str(msg), threaded=True)
The app GUI always freezes after running a method with toast notif in it... idk but you may give yourself a try... this method is a member of a tkinter toplevel class which i invoke when user clicks a button
on the top on it, I import a function I made dedicated for toast notification... the function looks like this: