title: how to use variable in python os.path.exists
body: <p>Here is my code</p>
  
  <pre><code>[root@04 ~]# python
  Python 2.4.3 (#1, May  5 2011, 16:39:10)
  [GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; import os.path
  &gt;&gt;&gt; pid = open('/var/run/httpd.pid' , 'r').read()
  &gt;&gt;&gt; print pid
  24154
  &gt;&gt;&gt; os.path.exists('/proc/',pid)
  Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in ?
  TypeError: exists() takes exactly 1 argument (2 given)
  </code></pre>
  
  <p>Even i tried following, its not working. How do i use variable <code>pid</code> in <code>os.path.exists</code> command? </p>
  
  <pre><code>&gt;&gt;&gt; os.path.exists('/proc/'+pid)
  False
  &gt;&gt;&gt;
  </code></pre>
  
  <p><strong>EDIT :</strong></p>
  
  <p>if i type manually PID number it works</p>
  
  <pre><code>&gt;&gt;&gt; print pid
  24154
  
  &gt;&gt;&gt; os.path.exists('/proc/24154')
  True
  &gt;&gt;&gt;
  </code></pre>