how to change current working directory while using pdb within emacs

du yan ning duyanning at gmail.com
Mon Nov 26 13:05:42 CET 2007


On Nov 21, 1:28 pm, "Diez B. Roggisch" <de... at nospam.web.de> wrote:
> duyanningwrote:
> > I have written a pyhton script that will process data file in current
> > working directory.
> > My script is in an different directory to data file.
> > When I debug this script using pdb within emacs, emacs will change the
> > current working directory to the directory which include the script,
> > so my script cannot find the data file.
>
> > I think this is the problem of emacs because when I start pdb from
> > console directly, it will not change current working directory to the
> > one of script being debugged.
>
> Just issue
>
> import os
> os.chdir('whatever')
>
> inside the pdb-session. Unfortunate, but should work.
>
> Diez

thank you! my friend.



More information about the Python-list mailing list