title: Trying to open a python script from another python script using Popen throws Windows Error
body: <p>I am trying to open a python script from another python script using Popen in Python 2.7.</p>
  
  <p>The two scripts are:</p>
  
  <p><strong>child.py</strong>: Takes 5 ints one by one and waits some time and prints its square</p>
  
  <pre><code>    import time
      for i in range(5):
          value = int(raw_input('Enter an integer: '))
          time.sleep(2)
          print "Its square is ", value*value
  </code></pre>
  
  <p><strong>parent.py</strong>: Opens child.py and writes 5 ints to its stdin and prints its stdout</p>
  
  <pre><code>    import subprocess, time
  
      # following is the line of interest
      child_program = subprocess.Popen("child.py", 
                                       stdin=subprocess.PIPE,
                                       stdout=subprocess.PIPE,
                                       stderr=subprocess.PIPE)
  
      for i in range(5):
          child_program.stdin.write(str(i)+"\n")
          child_program.stdin.flush()
          a = child_program.stdout.readline()
          print [a]  # I put it in list just to see exact format
  </code></pre>
  
  <p>The following are the <strong>other substitutions</strong> that I used for the first argument of Popen constructor in parent.py after seeing many similar question in stackoverflow</p>
  
  <pre><code>    "./child.py": Same WindowsError is produced
      &lt;full path&gt;:  Same WindowsError is produced
      ["python", "child.py"]: Did not raise error but opened python (useless)
  </code></pre>
  
  <p><strong>The WindowsError produced is:</strong></p>
  
  <pre><code>    WindowsError: [Error 193] %1 is not a valid Win32 application
  </code></pre>