REPL (an acronym for “read-eval-print loop”) is a execution paradigm implemented in a command line interpreter that:
- reads what you type (i.e.
- evaluates it,
- and prints the result if any.
A REPL console is a synonym for a command line interpreter.
- Prompt the user for some code,
- When they’ve entered it, execute it in the same process.
while True: code = input(">>> ") exec(code)
it’s much more complex, because it has to deal with:
- multi-line code,
- tab completion (using readline for instance),
- magic commands,
- and so on.