Skip to main content

Runs a REPL against a separate interpreter

Project description

zap-repl

Lets you run a Python REPL inside another process. No GDB required. Works across versions.

Usage:

# To run, then attach
python -m zap_repl /path/to/python foo.py

# To attach to an already-running interpreter
python -m zap_repl -p <pid>

Python ... on ...
>>> import os
>>> print(os.getpid())
<pid>

You can even have multiple attached concurrently, and they share their vars, as well as share vars with an interactive interpreter if there happens to be one.

Doesn't require planning ahead and loading anything in the target process, just a normal Python 3.8+ interpreter with stdlib.

Version Compat

This library is compatile with Python 3.10+, but should be linted under the newest stable version.

Versioning

This library follows meanver which basically means semver along with a promise to rename when the major version changes.

License

zap-repl is copyright Tim Hatch, and licensed under the MIT license. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zap_repl-0.2.0.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

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

zap_repl-0.2.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file zap_repl-0.2.0.tar.gz.

File metadata

  • Download URL: zap_repl-0.2.0.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zap_repl-0.2.0.tar.gz
Algorithm Hash digest
SHA256 734558f13fbbfbc18f80cd8373e4ebcb77be56b7866a6bc84e7d2351fdc6c1eb
MD5 96d68f6558cb38ae02f33d140aebfa1f
BLAKE2b-256 886c0d1dcad2bab0dd6dce01c01a673f06591415ae8905b4daedf2c4acb22417

See more details on using hashes here.

Provenance

The following attestation bundles were made for zap_repl-0.2.0.tar.gz:

Publisher: build.yml on advice-animal/zap-repl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zap_repl-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: zap_repl-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zap_repl-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 06cfb05655f6a3f1c2b13288cddb9c5561faa2f019a26f067b9ed6cfa0ac4516
MD5 300543108255a7755f369bb8d47ae576
BLAKE2b-256 b18012d14b9bcb49db96ccd631fe364363d5441eba922e2bf7e9ad14c339a095

See more details on using hashes here.

Provenance

The following attestation bundles were made for zap_repl-0.2.0-py3-none-any.whl:

Publisher: build.yml on advice-animal/zap-repl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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