I create a subprocess in python3.
p = subprocess.Popen('./a', stdin=subprocess.PIPE)
And I want to write to it stdin.
p.stdin.write('1\n')
do_something()
p.stdin.write('2\n')
But python only support write once. What should I do?
Should I use fcntl and how to use it?