title: Run terminal commands from python using Subprocess
body: <p>I'm trying to run a terminal command from my django but getting an error.</p>
  
  <p>Here's the command I want to run:</p>
  
  <pre><code>kubectl apply -f &lt;(istioctl kube-inject -f FILE_PATH)
  </code></pre>
  
  <p>Here's what I have tried:
  From <strong>views.py</strong></p>
  
  <pre><code>nodesvc = subprocess.call('kubectl apply -f &lt;(istioctl kube-inject -f ' + os.path.join(path) + '/nodeService.yaml)',
                                        shell=True)
  </code></pre>
  
  <p>I'm creating a file in temporary  directory and pass it's path here, which is correct.</p>
  
  <p>Here's the error :</p>
  
  <pre><code>/bin/sh: -c: line 0: syntax error near unexpected token `('
  /bin/sh: -c: line 0: `kubectl apply -f &lt;(istioctl kube-inject -f /var/folders/g2/8fzl8mjj5xxfqdfvrl7v3q_40000gn/T/tmpstfcq3es/nodeService.yaml)'
  </code></pre>
  
  <p>I think that something wrong with curly braces '(',
  How can I resole this issue, help me please!
  Thanks in advance!</p>