We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
popenargs
subprocess.run
1 parent b298d6d commit e899ae3Copy full SHA for e899ae3
Lib/subprocess.py
@@ -551,6 +551,10 @@ def run(*popenargs,
551
kwargs['stdout'] = PIPE
552
kwargs['stderr'] = PIPE
553
554
+ # backward compatibility
555
+ if not isinstance(popenargs, os.PathLike) and len(popenargs) == 1:
556
+ popenargs = popenargs[0]
557
+
558
with Popen(popenargs, **kwargs) as process:
559
try:
560
stdout, stderr = process.communicate(input, timeout=timeout)
0 commit comments