Episode Details

Back to Episodes
#501: A Nod to Sir-Mix-Alot

#501: A Nod to Sir-Mix-Alot

Episode 501 Published 1 month ago
Description
Topics covered in this episode:
Watch on YouTube

About the show

Sponsored by us! Support our work through:

Michael #1: Nod: pause your Python program and open a notebook at any line

Nod (Notebooks-on-Demand) is a JupyterLab extension by Eric Rawn that drops a notebook into a running Python program. Add a notebook() call anywhere, run the program with nod, and execution pauses there with a notebook containing all variables at that point in the call stack. Edits go back to the source file with a button, with cells converted to code and markdown to comments via Jupytext.

  • It answers the classic 'this would be easier in a notebook' debugging moment without copying snippets out to files.
  • Like a breakpoint with a notebook inside: the left panel walks the call stack and notebook state switches with it
  • Install is pip install nodpy plus nod --install-kernel, then run with nod python -m myfile
  • The round trip back to source is the differentiator; markdown cells become comments, cells become newlines, and notebooks are disposable since the source file recreates them
  • nodLog() stashes variable values across call
Listen Now

Love PodBriefly?

If you like Podbriefly.com, please consider donating to support the ongoing development.

Support Us