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.0.0.tar.gz (16.0 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.0.0-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pykernel_cli-1.0.0.tar.gz
  • Upload date:
  • Size: 16.0 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.0.0.tar.gz
Algorithm Hash digest
SHA256 4ffaf6620b53dc364bd5256035a37f659764e1819dd1f3e6cf66d496fd1121c0
MD5 7613c4877693ae56626cd9026c2f03e0
BLAKE2b-256 796d9c32eb1e5d8310cef3be571ce42991ff0de2085adc686ef604e3ae7d2f5a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pykernel_cli-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 19.5 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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f08aefd3c9f913c48ef01b2eb71173f96246bf308d5499fe6cc65ef12bc7603f
MD5 b0164676d82e33d82d9c070fec6fdeee
BLAKE2b-256 5f556429a1488e75aab46e44b8778653426f376142b6c1c4a0e7a6c33249abef

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