Q:

How to specifiy path when using pdb in emacs?

I am trying to use pdb in emacs. I need to change path to PYTHONPATH=lib. But when I typed 
Run pdb (like this): PYTHONPATH=lib pdb ./pychess. 
Emacs gives me an error saying the file PYTHONPATH=lib isn't found. How do I specify path when running pdb in emacs? In terminal PYTHONPATH=lib pdb ./pychess runs fine, but not in emacs.

Oh I got it just type PYTHONPATH=lib emacs when launching emacs. Not sure about changing path after launching though...

A:

you can try to set the environment variable with in the emacs (say putting in .emacs or using M-:) like this
(setenv "PYTHONPATH" "lib")

