pyk.krepl.repl module¶
- class BaseRepl[source]¶
Bases:
Cmd
,Generic
[T
],ABC
- CAT_BUILTIN: Final = 'Built-in Commands'¶
- CAT_DEBUG: Final = 'Debugger Commands'¶
- abstract do_load(args: Any) bool | None [source]¶
Abstract method to set up the interpreter. Subclasses are expected to * decorate the method with with_argparser to ensure the right set of arguments is parsed; * instantiate an Interpreter[T] based on args, then set self.interpreter; * set self.state to self.interpreter.init_state().
- interpreter: Interpreter[T] | None¶
- prompt = '> '¶
- state: T | None¶
- class KInterpreter(definition_dir: Path, program_file: Path)[source]¶
Bases:
Interpreter
[KState
]- definition_dir: Path¶
- program_file: Path¶
- class KRepl(definition_dir: Path)[source]¶
-
- intro = 'K-REPL Shell\nType "help" or "?" for more information.'¶