On POSIX systems, when you use Popen(['find', '.', '-iname', '"*.sln"'], shell=True) , Python does this:
/bin/sh -c find . -iname "*.sln"
If you read the documentation for sh , you will find that only the first argument after -c treated as a command line that should be executed as a shell script. The remaining arguments are actually considered shell script arguments. In this case, since the shell of the script consists solely of the name of the find command, the arguments are ignored. This can be observed if you run:
>>> subprocess.call(['echo arg0 = $0, arg1 = $1', 'foo', 'bar'], shell=True) arg0 = foo, arg1 = bar 0
source share