, . stdin - .
... | program.py
stdin stdout , . stdin - !
Hacking will combine these two threads into one, but this is not a good way to do this; It does not separate data correctly. If your program really needs to accept keyboard input as well as data transmitted through channels (you are sure that it should look like it is a very controversial thing!), The correct way to do this is to create separate threads to process each input of the streams.
source
share