dismantling code objects

Dean Hall dean.hall at computer.org
Mon Sep 24 11:13:49 EDT 2001


Hello,

I've been studying Python's internals and have come up with a document
and a tool that deal with code objects (PyCodeObject).  The document
explains what code objects are and discusses three examples of
dismantled code objects.  The tool is called Dismantle.  It is a
python module which compiles a source file to a code object and
recursively dismantles the code object and disassembles the byte code
(co_code) string yielding a human-readable representation of the code
object.  The PDF doc and the tool's source code are available from
sourceforge:

http://sourceforge.net/project/showfiles.php?group_id=32525&release_id=53714

I'd appreciate any feedback on the doc (I consider it a rough draft
and won't be offended by constructive criticism).  I'd also accept any
review of the source code (however it does what I need it to do, so I
may or may not make any changes to it)  Also, please use sourceforge
for discussion and bugs since I'm not on c.l.p much.

!!Dean



More information about the Python-list mailing list