◐ Shell
clean mode source ↗

Issue 2438: subprocess.Popen with wildcard arguments

When using wildcards as arguments to the processes being spawned by
Popen, it seems to interpret them as hard literals.

IE, when doing something like:
>>> import subprocess
>>> output = subprocess.Popen(['ls', '*'],
stdout=subprocess.PIPE).communicate()[0]
ls: *: No such file or directory
>>>
The default for Popen objects is to not use the shell, thus
no expansion.  Set shell=True in the Popen call:

>>> import subprocess
>>> output = subprocess.Popen(['ls', '*'])
>>> ls: *: No such file or directory

>>> output = subprocess.Popen(['ls', '*'], shell=True)
>>> configure.out	svn-stat.out	svn-update.out

Skip