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
In your case, Popen executed correctly, error is reported from ls. It should give same error when you execute the command:
ls
ls src/{t,p}*.cpp
in terminal.