python 3.x - Stack Overflow
https://stackoverflow.com/questions/5068251404.06.2018 · You need the first call to use Popen, where result.stdout is a real file (result.stdout returned by run is a bytes object, not a real file, because when run returns, the process is already ended, with all output produced, as opposed as Popen which starts the process and writes to a …