Text-based data inspector for Python?

Terry Jones terry at jon.es
Fri Jan 25 02:00:55 CET 2008


>>>>> "kj" == kj  <socyl at 987jk.com.invalid> writes:

kj> I've only recently started programming in Python, trying to wean
kj> myself from Perl.  One of the things I *really* miss from Perl is
kj> a 100% mouse-free data inspector, affectionally known as the Perl
kj> debugger, PerlDB, or just perl -d.  With it I can examine the most
kj> elaborate data structures with ease:

You actually liked the perl debugger... gasp!  OK, I used it too, but it
left a few things to be desired (the mouse was not one).

kj> And, since it's text-based, I can run it within a shell in Emacs, and
kj> transfer anything I want between it and an editing buffer without even
kj> a THOUGHT of touching the filthy mouse!  If there's a greater joy in
kj> life I have yet to find it.

I use M-x pydb to debug python from inside emacs. I like it more than the
straight pdb as it's a bit more like gdb.

In pydb (and pdb) there's p and pp to print and pretty print a python
object. They work pretty well & there's no need for the mouse.

kj> NOTE: In my address everything before the first period is backwards;
kj> and the last period, and everything after it, should be discarded.

Nice. See http://www.fluidinfo.com/terry/2007/10/31/stagnant-email-address-arms-race/

Terry



More information about the Python-list mailing list