4 ms·
Humm, I built a similar but more powerful tool: https://github.com/samuelcolvin/python-devtools https://github.com/samuelcolvin/python-devtools (install with
by scolvin 6y ago
Humm, I built a similar but more powerful tool:
https://github.com/samuelcolvin/python-devtools 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.
- scolvin 6y agoOne of the most useful trick I found was installing the tool via sitecustomize.py so you don't need the import: # 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-without-import 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.