Skip to main content

tracecode

tracecode records the execution of a Python script to create a standalone HTML viewer.

It is intended for instructors who want to make a program's execution visible:

  • step through the source code forward and backward
  • jump forward or backward to any line of code
  • see variable values
  • observe function call mechanics
  • see console input/output at each step
  • observe if, elif, and while condition outcomes
  • watch exceptions unwind the call stack

Output HTML files are completely self-contained and shareable.

Check out the interactive live demos.

Watch the interactive walkthrough

Installation

Requires Python 3.12 or later.

To install:

pip install tracecode

Use

Run a script with the tracecode command:

tracecode --auto-open path/to/script.py

The HTML trace is written next to the script, with the same name and an .html extension. --auto-open opens it in a browser. Arguments after the script name are passed to the script:

tracecode path/to/script.py first-argument

Metadata

Release files for tracecode 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tracecode 0.1.1
File Size Uploaded Provenance Actions
tracecode-0.1.1.tar.gz 20.8 kB Without provenance Details for tracecode-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tracecode 0.1.1
File Interpreter ABI Platform Actions
tracecode-0.1.1-py3-none-any.whl Python 3 none any Details for tracecode-0.1.1-py3-none-any.whl

Total release size: 36.3 kB

Release files / tracecode-0.1.1.tar.gz

Download URL tracecode-0.1.1.tar.gz
Size 20.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5f6b81602f72edb81d7aa78051f485c5892c83cb62f94321b684e180cc88aa17
BLAKE2b-256 checksum
How to use checksums
d6ee5b4fc25b98e02bef4c108b02e2b942fb636253d609088d170e9eb0df3689
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tracecode-0.1.1-py3-none-any.whl

Download URL tracecode-0.1.1-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
58b6d5e2a9181801ad82b50f7bdd96005a8c6a2e4a977be20171f77d11479223
BLAKE2b-256 checksum
How to use checksums
048ca046d9273524c0a356c364458cc663f69e49a8a5549b2733927d5eacdcf5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for tracecode 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page