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.2.0.tar.gz
(16.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pykernel_cli-1.2.0.tar.gz.
File metadata
- Download URL: pykernel_cli-1.2.0.tar.gz
- Upload date:
- Size: 16.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce82b6a01417d6dc04669326de86c305ae45853a940c8034e77ad63523d0e981
|
|
| MD5 |
6650a3bd8bf734be7c3d301aaa8c3620
|
|
| BLAKE2b-256 |
97c5ef706ba9afdfa36f406e349712f3168ea79480c358265b5b14a1e1dd3c05
|
File details
Details for the file pykernel_cli-1.2.0-py3-none-any.whl.
File metadata
- Download URL: pykernel_cli-1.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
facc22f669f693f6774d23ffa47deefd8f2d1efbffb289df4dfb8369dedd61c4
|
|
| MD5 |
45ce728ded57251e03c426a5abe11847
|
|
| BLAKE2b-256 |
b43fee4d5b070ded4a50ec77847d01140628707264e9adfb734d431b20998d6c
|