I currently have an Arduino sketch that communicates with Processing using <> delimited packets over serial, similar to other examples posted on the forums: Serial Input Basics - Programming Questions - Arduino Forum
Processing has a nice little function serialEvent() that I use as an independent thread to parse my data as it arrives in Processing: https://processing.org/reference/libraries/serial/serialEvent_.html
Is there a similar utility function for Python? We are porting our code to Python and I'm working my way through some of the forum Python examples, especially those based on pySerial (e.g. Demo of PC-Arduino comms using Python - Interfacing w/ Software on the Computer - Arduino Forum) as well as an example I have found elsewhere that incorporates PyQt: A slick threaded GUI for Arduino projects with Python and Qt | Wicked Device Shop
I just wanted to see before I got too far if there was a trivial way in Python to mimic Processing's serialEvent()
Thanks much