Project: traceback2

Backports of the traceback module

Project Details

Latest version
1.4.0
Home Page
https://github.com/testing-cabal/traceback2
PyPI Page
https://pypi.org/project/traceback2/

Project Popularity

PageRank
0.0017971631891538235
Number of downloads
859154

A backport of traceback to older supported Pythons.

import traceback2 as traceback

Profit.

Things to be aware of!

In Python 2.x, unlike traceback, traceback2 creates unicode output (because it depends on the linecache2 module).

Exception frame clearing silently does nothing if the interpreter in use does not support it.

traceback2._some_str, which while not an official API is so old its likely in use behaves similarly to the Python3 version - objects where unicode(obj) fails but str(object) works will be shown as b'thestrvaluerepr'.