https://stackoverflow.com/questions/32570029/input-to-c-executable-python-subprocess/32570656#32570656?newreg=53f1d08315894e229c1d7ba1be8d5cc9
I followed this link.
I installed Python properly
but Python code won’t work
this is my error message.
/bin/sh: 1: a.out: not found
Traceback (most recent call last):
File “CommunicationWithSubprocess3.py”, line 7, in
p.stdin.write(value)
IOError: [Errno 32] Broken pipe
“Broken pipe” error message pops up.
how can I solve this problem…?
“a.out” would be the name of the program to be executed…“a.out” is a default if no name was given during compile. The demo assumes a.out is in the same directory from which your other code runs. Try replacing ‘a.out’ with a full path using the specific program name if it isn’t a.out:
p = Popen(['/where/ever/it/is/a.out'], shell=True, stdout=PIPE, stdin=PIPE)