PYRS logo PYRS

REPL Reference

Edit this page

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, .helpPrint REPL help and command summary.
:clear, .clearClear pending multiline input buffer.
:pasteToggle paste mode; finish with :paste.
:timingToggle per-snippet timing output.
:resetRebuild interpreter session state.
:exit, :quit, .exit, .quitExit 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
TabInsert 4 spaces.
Shift+Tab, Ctrl+SpaceOpen completion menu.
EscDismiss completion menu/current suggestion.
Ctrl+DExit REPL on macOS/Linux terminals.

REPL Environment Variables

Variable Meaning
PYRS_REPL_THEMEauto, dark, or light theme mode.
PYRS_REPL_HISTORYOverride history file path; empty value disables history file usage.
PYRS_REPL_INITStartup script path; default is ~/.pyrsrc, empty disables startup script.

Session Example

REPL Command Flow
>>> :timing timing enabled >>> %time sum(range(1000)) 499500 [timing] 0.XXX ms >>> %timeit -n 1000 -r 5 sum(range(1000)) best of 5: ...