How to pass this tar command as argument to python subprocess
<p>If I am running the command that is specified in the args on the terminal then it goes successfully on terminal but doing the same in python program is not working; I am seeing junk characters in the screen to the size of the input tar file and lot of xterm words too; </p>

<p>I feel the problem is handling the ' ' letters in the args; </p>

<pre><code> import subprocess

 try:
     args = "cat parsing.tgz &lt;(echo -n ''| gzip)&gt; new-file.tgz".split()
     subprocess.check_call(args)
 except subprocess.CalledProcessError as e:
     print e
</code></pre>