On Wednesday 14 September 2005 12:34 pm, Ben Pearson wrote:
> I have a program that is developed in C, that has a simple text
> interface. I would like to use the same program, but with a GUI. I
> would like to use Python to interface with it, so that Python will
> simply read and write the code
> When this button is hit, it will send a code of 0 to the C
> program.
>
> ./mcp | python gui.py
Your pipe is backwards. Try this:
python gui.py | ./mcp
When your gui.py notices that a button got hit, it can just print the
number 0 (followed by a newline character) to standard output. This
beco