Lors de l'exécution de subprocess.run()
comme indiqué dans la documentation Python , j'obtiens un TypeError:
>>> import subprocess
>>> subprocess.run(["ls", "-l", "/dev/null"], capture_output=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.6/subprocess.py", line 403, in run
with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'
J'utilise Python 3.6.6:
$ python3 --version
Python 3.6.6