is there a way to shift to main thread from a background thread, for example;
import threading
def func(txt):
if txt == 'foo':
## must do the processing in the main thread
pass
else:
print(txt)
thread = threading.Thread(target = func, args = ('hello',))
thread.start()
Thanks in advance :)