Emacs + python

Marcio Rosa da Silva mrsilva at fastmail.fm
Fri Sep 24 09:08:46 EDT 2004


Steffen Ries wrote:
> You can either start pdb as "python <path-to-python-libs/pdb.py" or to
> make your life easier install an executable that does that. I'm using
> the following script in /usr/local/bin/pdb for this purpose:
> 

I tought that was what pydb (not pdb) does. But pydb doesn't worked for 
me (it is in /usr/bin/pydb on my system)

> --8<--
> #! /bin/sh
> lib=`python -c "import sys; print '%s/lib/python%s' % (sys.prefix, sys.version[:3])"`
>  
> python -u $lib/pdb.py "$@"
> --8<--

but this one works! Thanks!!!

> 
> with this script you start pdb as "M-x pdb <RET> pdb yourscript.py
> script arguments...<RET>"

:-)

>>Anyone can help me with this? I really don't know how to make it
>>work. I have seen in the python-emacs-mode that there are some code to
>>synchronize the code, but I could not make it work in this way (I
>>don't know enough elisp) :-(
>>
>>But anyway, thanks Chris for the tip. This one worked for me :-) It is
>>possible to set breakpoints using the source buffer instead of using
>>the line number?
> 
> 
> C-x <SPC> in the source buffer.

This works running pdb as you suggested, but with the set_trace() trick, 
  not (at least for me)

Problem solved now!

Thank you!!

Marcio



More information about the Python-list mailing list