Command works through terminal but not through python system call
pipe, python, subprocess, system
Solution
You need to set `shell=True` for the shell to interpret the command, and most of all the pipe:
call(args, shell=True)
Problem
I'm trying to make a system call from a python code to the Boxer text parser program and I find that the following set of statements doesn't work. It doesn't give me any error but I don't see any output file created. When I run the same command on the terminal, the output file does get created. ``` from subprocess import call candcStr = 'echo "Every Man Walks" | /home/candc-1.00/bin/candc --models /home/candc-1.00/models/boxer --output /tmp/test.ccg' args = shlex.split(candcStr) call(args) ``` When I run the above code, the console shows ``` Every Man Walks | /home/candc-1.00/bin/candc --models /home/candc-1.00/models/boxer --output /tmp/test.ccg ``` It appears as though the pipe redirection isn't working. Does anyone know how I can fix this ? Thanks!