Python module to modify bytecode
Project description
bytecode is a Python module to modify bytecode.
The API is unstable. The project is closer to a proof-of-concept (PoC).
A code object is made of blocks and a block is a list of instructions. An instruction has 3 main attributes: lineno, name, arg. Jumps use labels to blocks, each block object has an unique label.
It’s possible to get a flat code with only one block and without labels: use Code.disassemble(code, use_labels=False).
bytecode 0.0 has been written to reimplement the CPython 3.6 peephole optimizer in pure Python. This version only supports Python 3.6.
Homepage: https://github.com/haypo/bytecode
ChangeLog
2016-02-23: Release 0.0
First public release
See also
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file bytecode-0.0.tar.gz
.
File metadata
- Download URL: bytecode-0.0.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 353e8187dc77e52c1f728fea49be74a2323b7d1e9abbff30f7f9b1b736b66edf |
|
MD5 | c5ff883ad5039debddb0ed408f63170f |
|
BLAKE2b-256 | 5961b04113ace82cb05bd944bc577a5e6305833b8f82cd14b1ee8dead6b45a46 |
Provenance
File details
Details for the file bytecode-0.0-py3-none-any.whl
.
File metadata
- Download URL: bytecode-0.0-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03642d1d69269f9a8d5871194a67bd63e1799d0fc3d45ede3c74cec1bd4aa552 |
|
MD5 | 02f2d0533819470f903add127f41d4c4 |
|
BLAKE2b-256 | ece73834706da7191a83edfcf6c8293035b5e7db625cee7f81a17198d5511ead |