title: How to call relative path of batch file from python
body: <p>How do I call the relative path of batch file from python?</p>
  
  <p>My python script 'Script.py' is in the directory "d:\2014\python\script.py"
  from this file i would like to call a batch file "d:\2014\input\batch1.bat" but i want to use relative path with <code>popen()</code> function.</p>
  
  <p>In Script.py</p>
  
  <pre><code>import os, sys
  from subprocess import Popen
  p = Popen("D:\\2014\\input\\batch1.bat", cwd=r"D:\\2014\\input")
  stdout, stderr = p.communicate()
  </code></pre>
  
  <p>the above code will work but the below code will not work</p>
  
  <pre><code>p = Popen("..\\input\\batch1.bat", cwd=r"..\\input")
  stdout, stderr = p.communicate()
  </code></pre>
  
  <p>gives file not found error</p>