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.8 or newer. The latest release that supports Python 3.7 and 3.6 is 0.13.0. The latest release that supports Python 3.5 is 0.12.0. For Python 2.7 support, have a look at dead-bytecode instead.
Example executing print('Hello World!'):
from bytecode import Instr, Bytecode
bytecode = Bytecode([Instr("LOAD_GLOBAL", (True, 'print')),
Instr("LOAD_CONST", 'Hello World!'),
Instr("CALL", 1),
Instr("POP_TOP"),
Instr("LOAD_CONST", None),
Instr("RETURN_VALUE")])
code = bytecode.to_code()
exec(code)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution Built Distribution File detailsDetails for the file bytecode-0.16.2.tar.gz
.
f05020b6dc1f48cdadd946f7c3a03131ba0f312bd103767c5d75559de5c308f8
MD5 5eb9e930960c07ceac961e3ceb9d186f
BLAKE2b-256 53bb51d95655573fefef01943b911875ddc94a2ff0a82167c4a831c11d248150
See more details on using hashes here.
File detailsDetails for the file bytecode-0.16.2-py3-none-any.whl
.
0a7dea0387ec5cae5ec77578690c5ca7470c8a202c50ce64a426d86380cddd7f
MD5 625b0aa4e4a56f9f44f1856cc24ad9f0
BLAKE2b-256 a7982e09512abee834dc98afa3c167c04b042f2dd29846f5832da3fbe2907660
See more details on using hashes here.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4