Python module to generate and modify bytecode
Project description
bytecode is a Python module to generate and modify bytecode.
bytecode project homepage at GitHub (code, bugs)
Download latest bytecode release at the Python Cheeseshop (PyPI)
Install bytecode: python3 -m pip install bytecode. It requires Python 3.4 or newer.
Example executing print('Hello World!'):
from bytecode import Instr, Bytecode bytecode = Bytecode([Instr("LOAD_NAME", 'print'), Instr("LOAD_CONST", 'Hello World!'), Instr("CALL_FUNCTION", 1), Instr("POP_TOP"), Instr("LOAD_CONST", None), Instr("RETURN_VALUE")]) code = bytecode.to_code() exec(code)
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
bytecode-0.7.0.tar.gz
(52.6 kB
view details)
Built Distribution
bytecode-0.7.0-py3-none-any.whl
(42.3 kB
view details)
File details
Details for the file bytecode-0.7.0.tar.gz
.
File metadata
- Download URL: bytecode-0.7.0.tar.gz
- Upload date:
- Size: 52.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc6931151c7f0a542f8cf7619fe1639af3b9529c4678860fa3239397cb0f7de0 |
|
MD5 | 7a2d0589e31e80fc2184f86ddd57f415 |
|
BLAKE2b-256 | 30e3ccf016a3b30ff631550c1aae2be19a4a0592cb6746b54151daf4475cf0a0 |
Provenance
File details
Details for the file bytecode-0.7.0-py3-none-any.whl
.
File metadata
- Download URL: bytecode-0.7.0-py3-none-any.whl
- Upload date:
- Size: 42.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e464004d4a9eeeca987cb4950dba11b827964b6c90cd331c1f20abd2dab3c962 |
|
MD5 | af691f39fdff0b1eff555fcdacbca7a5 |
|
BLAKE2b-256 | b81e6ce400200c7392f6f9e7be5f8a6b4cbf0a5b7a132663fb021fc8d781d05a |