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.11.0.tar.gz
(58.8 kB
view details)
Built Distribution
bytecode-0.11.0-py3-none-any.whl
(46.1 kB
view details)
File details
Details for the file bytecode-0.11.0.tar.gz
.
File metadata
- Download URL: bytecode-0.11.0.tar.gz
- Upload date:
- Size: 58.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c7f73b7aa2d2c5470d80da2e8c15f4c43314a08e9f74bac7f34bc1a802f49ea |
|
MD5 | dcc1bdc0b2945e7798de2757d146a7c4 |
|
BLAKE2b-256 | 13a67d30bba2cf5e93d26379a8e248227800cbdbcaf801db432d4d40064d927c |
Provenance
File details
Details for the file bytecode-0.11.0-py3-none-any.whl
.
File metadata
- Download URL: bytecode-0.11.0-py3-none-any.whl
- Upload date:
- Size: 46.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6beee115babab0c7eb99ab807dead245133b8434d502ba7b6b3e7032426d23fb |
|
MD5 | 54c339922ea04cf641ace28cac2b0330 |
|
BLAKE2b-256 | b63313adc735b6566a7dd24723ac92313e744e802799c8cfdd3e49b1c1ec1fb8 |