Printing the current running stack in Python
Friday, 24 July 2009
The traceback module has utility functions for printing the currently running stack, not just tracebacks.
import traceback
import logging
# somewhere in your buggy code
logging.log(1, "".join(traceback.format_stack())
You should follow me on twitter here
Tags: Python
The entry 'Printing the current running stack in Python' was posted
on July 24th, 2009 at 9:30 am
and last modified on July 24th, 2009 at 9:31 am, and is filed under General, Python.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
No. 1 — October 4th, 2009 at 10:02 am
Sois absolutamente derechos. En esto algo es la idea excelente, mantengo.