Skip to main content
Latest release on the Python Cheeseshop (PyPI) Build status of bytecode on Travis CI Code coverage of bytecode on codecov.io

bytecode is a Python module to generate and modify bytecode.

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)

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coz_bytecode-0.5.1-py3-none-any.whl (39.5 kB view details)

Uploaded Python 3

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

Hashes for coz_bytecode-0.5.1.tar.gz
Algorithm Hash digest
SHA256 d1ac2488ce793bbd4b48a9dd1fa981dcb1cc984b375d0250b6efd4ca1a278244
MD5 4106d1dc6323ebca2d5bd80c04b9f9b3
BLAKE2b-256 13f38f552174fee1e26fed209f68d738885f31b83c727390e5b6827faa9f4827

See more details on using hashes here.

File details

Details for the file coz_bytecode-0.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for coz_bytecode-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 36a944a9c9d340f7fdc9d04a0cdf8580cf9ddfc471db9e631145824934584cb2
MD5 17af2b9d492f2e58b72ea3ff8d074f09
BLAKE2b-256 7e9672132b21d49ef06bd927ffd3c8bb352fa404f32c7a08ca4cad05ded9d1ee

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.5.1 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page