use check_output Python function instead of run when check=True
Consulting the Python docs, I realise I had the misunderstanding that the `input` parameter is only available for `run`. It is actually also available for `check_output` as far back as Python 3.4. With that in mind, I have to disagree with the Python docs: The recommended approach to invoking subprocesses is to use the run() function for all use cases it can handle. As soon as you are passing `check=True`, the `check_output` function is both fewer characters and more backwards compatible.
parent
b909bfc6
Please register or sign in to comment