Reblok 0.1.2 publish Python bytecode tool

Source: Internet
Author: User
Keywords PYTHON byte code Reblok
Tags abstract byte code code create python selection syntax

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.