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]
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.'