title: Python mode in Emacs: No such file or directory, pdb
body: <p>I have a python script that I want to debug with <a href="https://launchpad.net/python-mode" rel="noreferrer">python-mode</a>. I read in <a href="https://stackoverflow.com/questions/2324758/debugging-python-programs-in-emacs">this thread</a> that I can debug my python script with <code>M-x pdb</code>, however I get the following error:</p>
  <blockquote>
  <p>Searching for program: no such file or directory, pdb</p>
  </blockquote>
  <p>I can provide <code>python -m pdb my_source_file.py</code> in the prompt in the minibuffer, but it would be nice if Emacs could infer this command directly from the file on which I run <code>M-x pdb</code></p>
  <h2>Update:</h2>
  <h3>Running on:</h3>
  <ul>
  <li>Red Hat Enterprise Linux Server release 5.1 (Tikanga)</li>
  <li>Emacs 23.3.1</li>
  </ul>
  <h3>Differences between paths</h3>
  <p>I get different paths when I run <code>M-: exec-path</code> and when I run <code>M-: (getenv &quot;PATH&quot;)</code> (the one returned by <code>M-: (getenv &quot;PATH&quot;)</code>  is longer).</p>
  <p>With this:</p>
  <ul>
  <li>Where is <code>pdb</code> located? How can I add it to the Emacs path?</li>
  <li>Is there a way to ask Emacs to <strong>also</strong> look into the paths held by the environment variable <code>PATH</code>?</li>
  </ul>