I have a sketch that starts a Python script as an asynchronously running process. The Python script sits in a loop, it's basically a UDP handler, receiving packets and passing them back to the sketch for processing.
BUT I also need the skecth to send packets to the Python script without stopping the script or starting another one.
I though process.write() in the bridge library may be the answer, but I don't really understand if I can pick this up from my 'running' Python script.
"Speaking" to a running process can be done in several ways. The easiest is using linux pipes: with the yun and the bridge you can start the process with Process and use process.write() to talk to it.
If the process is NOT run by bridge then it's a typical "system integration" issue and you must use other means: sockets, files, ftp, external services... whatever both sides can access in read/write (depending on their needs)
As your script is UDP handler I'll make another script that emits UDP packets and use Process to start it when needed