Running subprocess won't handle curly braces correctly
# Python 2.7.4
import subprocess
subprocess.Popen('ls src/*.cpp',shell=True):
src/tonemap.cpp src/pch.cpp
subprocess.Popen('ls src/{t,p}*.cpp', shell=True)
ls: cannot access src/{p,t}*.cpp: No such file or directory
The same program will work on a different machine with python 2.7.2. Both systems use bash shells.
Do you the reason and how can I fix it?
EDIT:
Invoking the command directly from the command line returns the correct result:
ls src/{t,p}*.cpp
src/tonamep.cpp src/pch.cpp