Debugger visualization is a really great idea. I hadn’t thought of using attribute annotation to do it but now I’m wishing more languages had that.
edit: actually, I guess that focuses more on the debugger side, and less on the language side, so not a great answer to your question.
You can even embed that Python script within the shared object using some scary ELF tricks - I was surprised, to say the least, to discover this is supported.