Humm, I built a similar but more powerful tool:
https://github.com/samuelcolvin/python-devtools
(install with `pip install devtools`)
It has similar functionality for debugging but has prettier formatting and code highlighting using pygments.
https://github.com/samuelcolvin/python-devtools
(install with `pip install devtools`)
It has similar functionality for debugging but has prettier formatting and code highlighting using pygments.
# add devtools debug to builtins
try:
from devtools import debug
except ImportError:
pass
else:
__builtins__['debug'] = debug
(see https://github.com/samuelcolvin/python-devtools#usage-withou...)This would work with icecream too.
The second advantage of not needing the import is that CI fails if you forget to remove all debug() commands.