thanks for helping me out.
I am trying to run antiword from python to convert .docx to .doc. I have used subprocess for the task.
import subprocess
test = subprocess.Popen(["antiword","/home/mypath/document.doc",">","/home/mypath/document.docx"], stdout=subprocess.PIPE)
output = test.communicate()[0]
But it return the error,
I can't open '>' for reading
I can't open '/home/mypath/document.docx' for reading
But the same command works in terminal
antiword /home/mypath/document.doc > /home/mypath/document.docx
What am I doing wrong ?