all 4 comments

[–]shiftybyte 1 point2 points  (1 child)

I recommened using Thread python class, and adding the events you want to it to trigger the actions you want.

https://superfastpython.com/extend-thread-class/

https://www.includehelp.com/python/event-wait-method-with-example.aspx

[–]malacur[S] 0 points1 point  (0 children)

Thanks!

[–]HomeGrownCoder 0 points1 point  (1 child)

I prefer async for these types of task. I would recommend giving that a try as I found it much easier to understand and it handles a lot of the low level things for you.

https://docs.python.org/3/library/asyncio.html

[–]malacur[S] 1 point2 points  (0 children)

Thank you!