cool-RR / PySnooper

Never use print for debugging again
MIT License
16.39k stars 954 forks source link

feature request: colored scheme in Jupyter-Notebook/terminal #143

Open JNU-Tangyin opened 5 years ago

JNU-Tangyin commented 5 years ago

image

the above is a usually appeared screen-shot in jupyter notebook, if colored in columns, it would be really helpful to distinguish time/line number/code/variables parts.

alexmojaki commented 5 years ago

This depends on #1 being solved first. Notebooks support coloring via ASCII escape codes so the same code should pretty much work, although getting the colors to look good may take extra work.

I recommend you try the alternative library snoop. It has output coloring and special Jupyter notebook support. Also in my opinion the output is also easier to read even without coloring (if you don't agree, you can discuss the layout here). Here is an example:

Screen Shot 2019-07-21 at 21 10 57

Admittedly it doesn't look as good as it does in the terminal, I've opened https://github.com/alexmojaki/snoop/issues/8 which has some workarounds and where we can brainstorm how to tackle this.