Earlier quoted context omitted.
I haven't even gotten into org mode, I just edit Python using emacs and it works great. I can evaluate parts of the code and jump to the interpreter when needed. I keep a matplotlib window open with plt.ion() when running locally, or use plt.savefig() when running remotely and have a qiv window open that automatically detects new images. Works great. The only thing I would like is to be able to use the Python interpr…
To interactively inspect within a function, you could use the debugger with `breakpoint()`. But it's not a regular Python interpreter, which annoys me having to learn the different syntax. You can also embed IPython interactively with: import IPython; IPython.embed() though IPython kinda doesn't clean up after itself, so it's a bit messier (your prompt is messed up afterwards). Finally, you can: import code; code.int…
https://stackoverflow.com/questions/4234612/launch-an-ipytho...
This gives you a pdb prompt not an IPython prompt, but you can examine local variables where the exception was raised, and exit back to IPython with Ctrl-D.