title: How to pass arguments to subprocess
body: <p>I want run a process called client.sh in gnome-terminal via python script and want to pass the arguments as input to execute it.  Below is my code</p>
  
  <pre><code>import os
  import subprocess
  import time
  from subprocess import Popen,PIPE
  import pexpect
  process = subprocess.Popen('sudo gnome-terminal  -x ./client.sh', stdin=PIPE, stdout=PIPE, stderr=PIPE, shell=True)
  process.communicate(input = "1") 
  </code></pre>
  
  <p>my intension is to send input as "1" to client.sh process.
  But with above code my process[client.sh] didn't get any input.
  How can i send inputs to my sub process process?.</p>