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.5.tar.gz
(45.1 kB
view details)
Built Distribution
bytecode-0.5-py3-none-any.whl
(35.1 kB
view details)
File details
Details for the file bytecode-0.5.tar.gz
.
File metadata
- Download URL: bytecode-0.5.tar.gz
- Upload date:
- Size: 45.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9178198a87148102cbf15bb26c75533a7fcff517e8df7f3eb8a505d9ffe08ea |
|
MD5 | 7d562fcb0bb50e1567e7241bdfed9d2c |
|
BLAKE2b-256 | 3f3838b03d8d00e3ed607189561f9591c9a469b787155cc1d05172a35253abf2 |
Provenance
File details
Details for the file bytecode-0.5-py3-none-any.whl
.
File metadata
- Download URL: bytecode-0.5-py3-none-any.whl
- Upload date:
- Size: 35.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70564b6d6403471d940eac5aef6c9cb23774763a07235d106d60a1249a5726ac |
|
MD5 | c76c7a89d44d266a882c423adda0ee7c |
|
BLAKE2b-256 | a34d7bfb338936203acdedeaeeda1d1d295585834054dda5a5083bb95b70fcde |