Most interpreted languages follow the same underlying event model—Read-Eval-Print Loop (REPL)—and IPython are no exception. In REPL, interaction with the user is broken down into three steps:
The system reads the input from the user and parses it into an internal format.
The system evaluates the parsed input.
The result of this evaluation is printed to the user.
In a "standard" interpreter, all phases of REPL are executed within the same thread. An important feature of IPython is that the "eval" phase has been separated out into its own process. This process is called a kernel, and it communicates with the other components via messaging. This allows for great flexibility; terminals and kernels can run on different machines, one kernel can support multiple terminals, and development of different terminals and kernels for specialized uses is possible. It also makes for a clean parallel architecture, as will be demonstrated in Chapter 4, Messaging...