Detailed command, keybinding, and environment reference for the PYRS REPL.
This page is the command-level reference for PYRS interactive mode.
Meta Commands
| Command | Behavior |
:help, .help | Print REPL help and command summary. |
:clear, .clear | Clear pending multiline input buffer. |
:paste | Toggle paste mode; finish with :paste. |
:timing | Toggle per-snippet timing output. |
:reset | Rebuild interpreter session state. |
:exit, :quit, .exit, .quit | Exit interactive REPL. |
Magic Commands
| Command | Behavior |
%time <expr-or-stmt> | Run one snippet and print execution time. |
%timeit [-n N] [-r R] <expr-or-stmt> | Run repeated timing loops with optional loop/repeat controls. |
Keys and Interaction
| Key | Action |
Tab | Insert 4 spaces. |
Shift+Tab, Ctrl+Space | Open completion menu. |
Esc | Dismiss completion menu/current suggestion. |
Ctrl+D | Exit REPL on macOS/Linux terminals. |
REPL Environment Variables
| Variable | Meaning |
PYRS_REPL_THEME | auto, dark, or light theme mode. |
PYRS_REPL_HISTORY | Override history file path; empty value disables history file usage. |
PYRS_REPL_INIT | Startup script path; default is ~/.pyrsrc, empty disables startup script. |
Session Example
>>> :timing timing enabled >>> %time sum(range(1000)) 499500 [timing] 0.XXX ms >>> %timeit -n 1000 -r 5 sum(range(1000)) best of 5: ...