I have a threaded C program that I want to launch using a Python GUI in a Unix environment. I want to be able to change the state of the GUI by gathering output from the C program.
For instance, this is output from my C program using printf:
Thread on tile 1: On
Thread on tile 2: OFF
Thread on tile 3: Disable
...
Thread on tile 61: ON
I would update my GUI based on the output. What makes the problem difficult is both my GUI and the C program need to run simultaneously and updates happening in realtime. I also need to be able to send commands to the C program from my GUI.
I'm new to Python, C, and Unix (I know, complete rookie status). I've read up on subprocess, Popen, and pexpect, but not sure how to put it all together of if this is even possible at all.
Thanks in advance