[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: python.el fixes for Emacs 22
From: |
Nick Roberts |
Subject: |
Re: python.el fixes for Emacs 22 |
Date: |
Wed, 20 Feb 2008 13:30:22 +1300 |
> in any case, i *do* want to see pdb tracking included in whichever.
> as the author of the feature, i should be able to authorize its use
> wherever, and am frustrated with the twisty turns of events that have
> prevented that.
>
> If you wrote the original version, we can install that
> with papers from you alone. (Just say that you consider
> it a change to Emacs and your assignment will cover it.)
>
> You could also give us any of your own subsequent changes.
>
> Then others (or you) could implement replacements for subsequent
> improvements.
As Ken is the author of these changes, has an assignment for Emacs and is keen
to see them installed, to move things along I have installed them.
My understanding is that the advantage of Pdbtrack is that you can start to
debug on the fly. There's a small example attached below using a file called
fibo.py (which I probably pinched from somewhere, but I can't remember where).
However, as I've said before I'm not a Python programmer and Ken can probably
explain better.
Note that python-shell is similar to run-python and one should probably
eventually subsume the other.
So, all credit to Ken, complaints to me... no, what the heck, give Ken your
grief too!
More seriously, this is only on the trunk and I can always revert these changes
if there are problems.
Enjoy!
Ken,
Have you got write access yet?
--
Nick http://www.inet.net.nz/~nickrob
---------------------------------------
# Fibonacci numbers module (fibo.py)
def fib (n): # write Fibonacci series up to n
a, b = 0, 1
while b < n:
print b,
a, b = b, a+b
def fib2 (n): # return Fibonacci series up to n
result = []
a, b = 0, 1
while b < n:
result.append (b)
a, b = b, a+b
return result
---------------------------------------
Pdbtrack:
M-x python-shell (note doesn't use run-python)
Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pdb
>>> import fibo
>>> pdb.run ("fibo.fib(1000)")
> <string>(1)<module>()
(Pdb) b fibo.py:5
Breakpoint 1 at /home/nickrob/python/fibo.py:5
(Pdb) c
> /home/nickrob/python/fibo.py(5)fib()
-> while b < n:
(Pdb)
Source should appear in buffer with overlay arrow.
- Re: python.el fixes for Emacs 22, (continued)
- Re: python.el fixes for Emacs 22, Richard Stallman, 2008/02/15
- Re: python.el fixes for Emacs 22, David Kastrup, 2008/02/15
- Re: python.el fixes for Emacs 22, Ken Manheimer, 2008/02/15
- Re: python.el fixes for Emacs 22, Nick Roberts, 2008/02/15
- Re: python.el fixes for Emacs 22, Ken Manheimer, 2008/02/15
- Re: python.el fixes for Emacs 22, Nick Roberts, 2008/02/15
- Re: python.el fixes for Emacs 22, Ken Manheimer, 2008/02/15
- python.el versus python-mode.el [was Re: python.el fixes for Emacs 22], Glenn Morris, 2008/02/15
- Re: python.el fixes for Emacs 22, Richard Stallman, 2008/02/17
- Re: python.el fixes for Emacs 22, Richard Stallman, 2008/02/17
- Re: python.el fixes for Emacs 22,
Nick Roberts <=
- pdbtrack [was Re: python.el fixes for Emacs 22], Glenn Morris, 2008/02/19
- Re: pdbtrack [was Re: python.el fixes for Emacs 22], Nick Roberts, 2008/02/19
- Re: pdbtrack, Glenn Morris, 2008/02/19
- Re: pdbtrack [was Re: python.el fixes for Emacs 22], Ken Manheimer, 2008/02/21
- Re: pdbtrack, Glenn Morris, 2008/02/21
- Re: pdbtrack, Ken Manheimer, 2008/02/22
- Re: pdbtrack, Stefan Monnier, 2008/02/22
- Re: pdbtrack, Ken Manheimer, 2008/02/23
- Re: pdbtrack, Nick Roberts, 2008/02/22
- Re: pdbtrack, Ken Manheimer, 2008/02/23