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)
Metadata
Release files for bytecode 0.11.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bytecode-0.11.0.tar.gz | 58.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bytecode-0.11.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 104.9 kB
Release files / bytecode-0.11.0.tar.gz
| Download URL | bytecode-0.11.0.tar.gz |
|---|---|
| Size | 58.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c7f73b7aa2d2c5470d80da2e8c15f4c43314a08e9f74bac7f34bc1a802f49ea
|
|
BLAKE2b-256 checksum How to use checksums |
13a67d30bba2cf5e93d26379a8e248227800cbdbcaf801db432d4d40064d927c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / bytecode-0.11.0-py3-none-any.whl
| Download URL | bytecode-0.11.0-py3-none-any.whl |
|---|---|
| Size | 46.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6beee115babab0c7eb99ab807dead245133b8434d502ba7b6b3e7032426d23fb
|
|
BLAKE2b-256 checksum How to use checksums |
b63313adc735b6566a7dd24723ac92313e744e802799c8cfdd3e49b1c1ec1fb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|