Python Forum
Event listeners - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Event listeners (/thread-27366.html)



Event listeners - AnWa - Jun-04-2020

Hi! First time poster here.

I have a project that requires a lot of pseudo-parallel I/O (cycling quickly enough that a human user doesn't notice it) and was suggested that I use Javascript because of its concurrency and use of event listeners, but I would rather like to use Python, since I am more familiar with it.

Is there a way to copy the event listener functionality from JS in Python? I would like to avoid having to explicitly poll other processes/threads/objects all the time.

Thank You in advance


RE: Event listeners - Larz60+ - Jun-04-2020

you can read up on this and find examples here: https://python-can.readthedocs.io/en/master/listeners.html