title: Python subprocess calling a module
body: <p>I have 2 modules test1.py &amp; test2.py and both are located under c:/python27, From test1.py, Im trying to call test.py as shown below but I get an error. </p>
  
  <p>Test1.py</p>
  
  <pre><code>import subprocess
  print 'Im in module-1'
  
  subprocess.Popen('c:/python27/test2.py')
  </code></pre>
  
  <p>test2.py</p>
  
  <pre><code>print 'Im in module-2'
  </code></pre>
  
  <p>Error:-</p>
  
  <pre><code>C:\Python27&gt;python test1.py
  Im in module-1
  Traceback (most recent call last):
    File "test1.py", line 4, in &lt;module&gt;
      subprocess.Popen('c:/python27/test2.py')
    File "C:\Python27\lib\subprocess.py", line 679, in __init__
      errread, errwrite)
    File "C:\Python27\lib\subprocess.py", line 896, in _execute_child
      startupinfo)
  WindowsError: [Error 193] %1 is not a valid Win32 application
  </code></pre>