using trace to do 'in place' evaluation of variables

E

Edward Peschko

All,

I've been using the trace module for python (as per
http://www.dalkescientific.com/writings/diary/archive/2005/04/20/tracing_python_code.html),
and would very much like to have a feature there that I've implemented
for perl already.

Namely, I would like output in the format as described on that page,
but with the ability to have the running window partitioned into 2,
like:


/tmp/file.py:13: yy = 12 | = 12
/tmp/file.py14: xx = yy | = 12

where the window on the left shows the actual source code, and the
right shows how that code eval's (ie: how the scalars resolve based on
their current scope.)

Is this possible given the current trace functionality? I've found it
an *incredible* time saver with my perl code, especially for hard to
find data bugs - to debug I simply look for a pattern which is
associated with a given bug, and then backtrack that pattern to where
it first appeared in my code.

Also, is there a good archive searcher for the python-list archives?
Short of doing a complete download of
http://mail.python.org/pipermail/python-list/ and indexing it, I don't
see how I can do a decent pattern search on previous archive entries..

Thanks much,

Ed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top