Settings

Theme

extipy – Debug your Python script with a Jupyter notebook

github.com

3 points by meken 4 months ago · 4 comments

Reader

mekenOP 4 months ago

Sometimes I'm debugging a Python script which is processing rich text data (e.g. images) and really miss the fact that I don't have access to the capabilities in a Jupyter notebook for displaying that data. So I made a little tool that allows you to insert a breakpoint into your Python script (an IPython kernel) and explore the current state in a Jupyter notebook.

In this way, extipy can be thought of as a rich-text debugger.

  • martianlantern 4 months ago

    Do you know you can achieve the exact same functionality with the vscode's inline code execution in python files and can create jupyter like code cells with '# %%'?

    ref: https://code.visualstudio.com/docs/python/jupyter-support-py...

    • mekenOP 4 months ago

      No I’ve never heard of it — will play around with it later!

      Thanks for mentioning it!

      • mekenOP 4 months ago

        Okay I tried it out... it's pretty funky. I was expecting to get a fully featured Jupyter notebook, but the Interactive tab is more like a REPL because the "cells" are immutable. You can re-run the cells, which is something. It seems like it's somewhere between a REPL and a notebook.

        Though interesting, this tool is unsatisfactory for my workflow - if it was I would have just stopped at using an IPython REPL (not being able to freely edit and manipulate cells is a deal-breaker for me).

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection