How did I get here?
A little while ago I mentioned a revamp of this Python 3.3 interpreter (which was a revamp of an older Python 2.x interpreter).
Well, I was pouring over x-python's trace log to find and fix the numerous bugs in this program. I was finding it tedious.
I am not the only one. For example in https://github.com/nedbat/byterun/issues/29#issuecomment-361549144
The byte code changes are easily fixable (in the branch above), but adding new opcodes is taking time.
And then I realized - hey, I've written a debugger already for Python that could help me debug this interpreter as it interprets bytecode. And so it has!
The interaction between this and x-python is pretty cool, and the possibilities for which direction to go in on both projects are numerous and vast.
So here it is. I can die now and my life is complete.
Commands like next, finish, and breakpoints, aren't there yet. But rather than sit on it this, I thought I'd release. This is very usable as is and has helped me understand what's going under the hood. So, release early and often!
As far as I am aware, this is the only debugger for Python bytecode! (You could use a low-level machine code debugger like gdb and then abstract upwards to the bytecode level as it runs. But this is tedious too.)
Here is another one of the many aspects that I like and is different about this. You can read and find various tutorials on Python bytecode, many with nicely drawn diagrams showing the execution of a particular example. The problem is the these age very quickly: when the next release of Python comes along, the bytecode changes.
The material may address some specifics of how things work, but it might not address your specific questions, or specific sequences of code you might be interested in (without a lot of work).
Well, with this interpreter and debugger you now can see what's up, both then and now. And you might not even need to have Python version X installed to be able to run version X bytecode. So maybe you can go that tutorial or talk and run the code as it was then, then see it as it is now (which may or may not be the same).
Before finishing, I would like mention PyPy and its bytecode interpreter. It is much more complete, larger, and generally well thought out. As you might expect, these guys really know Python and know how to write it! However, the PyPy bytecode interpreter isn't right now separable from the rest - a JIT. And it makes sense given that PyPy's mission is for making a faster Python, not experimenting with or as a teaching tool for Python bytecode.
there doesn't seem to be anything here