Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Generate Python trace log in HTML

Project Description

Disptrace traces Python code execution, generating HTML file to display execused line of codes. The resulting HTML has navigation menu to collapse function calls or hide paticuler modules and functions.


Create disptrace.Disptrace object as trace module in Python standard library, and invoke target function to be traced as follow:

import disptrace
t = disptrace.DispTrace()
with open("trace.html", "w") as f:

DispTrace.render() method generates HTML string of the information.

~/.disptrace file

You can create ~/.disptrace file to specify default value of ignoremods and ignoredirs in ConfigParser style ini file:

ignoremodule=sys, os

ignorepath is a list of directories whose modules or packages should be ignored. Each path should deilmited by os.path.pathsep character (‘:’ in Unixes, ‘;’ in Windows).

ignoremodule list of modules or packages to ignore. Each modules should be delimited by ‘,’ character.

Release History

This version
History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(7.3 kB) Copy SHA256 Hash SHA256
Source None Aug 11, 2012

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting