This is a tool I made to explore the inner workings of the python interpreter.
This plugin pipes the contents of your active buffer into dis.py. It prints the resulting CPython bytecode in a scratch buffer.
Calling the built in setup() function creates the auto-command :EcdysisDisassembleCurrentBuffer.
You will need Python 3.5 at least. Behaviour will differ based on the exact version used.
{
"leslykinzel/ecdysis.nvim",
config = function()
require("ecdysis").setup()
end,
}use {
'leslykinzel/ecdysis.nvim',
config = function()
require('ecdysis').setup()
end
}Open a python file and run this:
:EcdysisDisassembleCurrentBuffer
If your python code contains egregious syntax errors (e.g. using undeclared functions), not only will the disassembly fail, but the stack trace will be printed in the background of the terminal window. This is only visible if you use a transparent background in Neovim.