I am struggling to understand how to pipe commands using python.
What I want to do is:
echo 'subject:Hello World' | "/usr/bin/xxx -C -P Support\\XXX vmail" I have tried this but it just throws the error "TypeError: bufsize must be an integer"
subprocess.call("echo","subject:xxx","|","/usr/bin/xxx","-C","-P","Support\\XXX","vmail") Can this be done with python ?
Edit
I managed to get it to work using the 2 processes, but what about if I want to pipe a python object (email message) to an external program as an object rather than converting it to a string and echoing it ?