Python module to generate and modify bytecode (Temporary CoZ Fork)
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)
This is a fork of https://github.com/vstinner/bytecode
It will be removed from Pypi once the original is deployed there.
Install bytecode: python3 -m pip install coz_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
coz_bytecode-0.5.1.tar.gz
(49.6 kB
view details)
Built Distribution
File details
Details for the file coz_bytecode-0.5.1.tar.gz
.
File metadata
- Download URL: coz_bytecode-0.5.1.tar.gz
- Upload date:
- Size: 49.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1ac2488ce793bbd4b48a9dd1fa981dcb1cc984b375d0250b6efd4ca1a278244 |
|
MD5 | 4106d1dc6323ebca2d5bd80c04b9f9b3 |
|
BLAKE2b-256 | 13f38f552174fee1e26fed209f68d738885f31b83c727390e5b6827faa9f4827 |
File details
Details for the file coz_bytecode-0.5.1-py3-none-any.whl
.
File metadata
- Download URL: coz_bytecode-0.5.1-py3-none-any.whl
- Upload date:
- Size: 39.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36a944a9c9d340f7fdc9d04a0cdf8580cf9ddfc471db9e631145824934584cb2 |
|
MD5 | 17af2b9d492f2e58b72ea3ff8d074f09 |
|
BLAKE2b-256 | 7e9672132b21d49ef06bd927ffd3c8bb352fa404f32c7a08ca4cad05ded9d1ee |