When you use the run command the calling process waits for the subprocess to complete and then returns a CompletedProcess object with attributes that provide information about what happened: This ...
If you want to interact with a subprocess then things become much more complicated. The reason is that most of the programs you are likely to want to run are written in C and this changes the way that ...