Skip to main content

A hackable Python REPL with first-class command support

Project description

PyKernel

A hackable Python REPL with first-class command support.

Install

pip install pykernel

Usage

pykernel
# or
python -m pykernel

Type /help to see all commands.

Commands

Command Description
/help List all commands
/vars List variables in the namespace
/run <file> Execute a Python file
/sh <cmd> Run a shell command
/snip Manage code snippets
/timeit <expr> Time an expression

Plugins

Drop a .py file with a register(registry) function into ~/.pykernel/plugins/:

def register(reg):
    @reg.command("hello", help="Say hello")
    def cmd_hello(ctx, *args):
        ctx.print("Hello!")

Config

Edit ~/.pykernel/config.toml:

[kernel]
prompt = ">>> "
theme  = "dark"   # dark | light | none

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

pykernel_cli-1.1.0.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

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

pykernel_cli-1.1.0-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file pykernel_cli-1.1.0.tar.gz.

File metadata

  • Download URL: pykernel_cli-1.1.0.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for pykernel_cli-1.1.0.tar.gz
Algorithm Hash digest
SHA256 a7bce5dce6aba257771e8e5554b8cf7c229bb158a97c9b1eb7b2e361fa576679
MD5 e8c21c68ae9c5356469e46937da5bdb7
BLAKE2b-256 a0017e92ceba6d2010755385870c69769afe7dee68b55d0285de415dd36b5bfc

See more details on using hashes here.

File details

Details for the file pykernel_cli-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pykernel_cli-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for pykernel_cli-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e8653fc8a16f0f1d5b7a77d6f4b7639cbf35f4f24eaee60cdf4f62eacac1effb
MD5 186d3305640e946b893d5c052bac40bc
BLAKE2b-256 0f1e71a7ef6c267d1e037af82739f0deeaae5959cc5082ed60dbcd426272e1b1

See more details on using hashes here.

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