Tuesday, September 16, 2008

Python virtual machine document

I've finished reading an excellent document on Python virtual machine and related stuff.
http://www.nasuinfo.or.jp/FreeSpace/kenji/sf/python/virtualMachine/PyVM.htm (Japanese)

It covers

- disassembling with inspect module and dis module
- FrameObject, FunctionObject, CodeObject and their relationship
- data stack
- local, enclosure, global, builtin scope ... how they are implemented
- how to read Python Virtual Machine source code (ceval.c)
- other

I don't know if Japanese-English machine translation works well but if it does it'll be a good start to understand Python VM.

I'm currently reading inspect module to make a speech on "Python code reading", a meeting held by a local Python community in Tokyo.

No comments: