This is a simple notebook mode for Emacs. (Since it uses faces to change colors and read/write attributes of text, it will not work with XEmacs.)
Notebook mode sets up a sub process that has well defined input and output responses. Each notebook has a collection of cells, consisting of a prompt, an input region and an output region. You tell Emacs to send a cell to the process (using C-Enter or M-Enter with my default key bindings) and when the process responds, it will paste the output in to the output region. You can then go back and edit other cells and re-enter them. Between the cells is regular text, which you can do with as you wish.
This is different from the standard shell mode, because you may send several input regions at once, and the output will be sorted out and pasted next to its corresponding input.
This idea of a notebook with cells is popular with programs such as Matlab, Maple or Mathematica. I use it with matlab, and then pipe the notebook through latex, so that I can write up what I'm computing, while I compute it.
Version 2.0 now uses font lock to highlight the input and output regions of a cell. Also, the code should be more resilient to bad files.
See the SourceForge project page for up-to-date information, downloads, and the CVS repository.