Reblok the abstract Syntax tree (AST) that a utility uses to create Python bytecode.
Reblok 0.1.2 This release adds a new selection Reblok scheme that shows python's opcode and ast tree, adds a unit-tested Reblok program, and adds support for the following opcode: Delete_local Delete_global, Delete_name,unpack_sequence,break_loop, and Store_attr.
New keyword opcodes:delete_local, Delete_global, Delete_name, Unpack_sequence, Break_loop, store_attr Fix:loop According variable is now Reblok instruction add new options to Reblok program:display python opcodes, display AST tree Unittests for Reblok
Sample code:
>>> from Reblok import http://www.aliyun.com/zixun/aggregation/33959.html ">parser>>> add = lambda x: x + 1>>> Print Parser (). Walk (add) [' function ', ' <lambda> ', [' ret ', (' Add ', (' var ', ' x ', ' ' local '), (' const ' , 1)]], [(' X ', ' <undef> ')], none, none, [], {}]
Download Address: http://devedge.bour.cc/resources/reblok/src/reblok.latest.tar.gz