Why does this code run successfully in the terminal (Ubuntu 12.04):
python -c "print 123" > >(tee stdout.txt)
But this code in python (2.7.5):
import os
os.system('python -c "print 123" > >(tee stdout.txt)') # same command
generates this error?
sh: -c: line 0: syntax error near unexpected token `>'
sh: -c: line 0: `python -c "print 123" > >(tee stdout.txt)'