You might be able to subclass code.InteractiveInterpreter to do this. Jacek Generowicz <jacek.generowicz at cern.ch> wrote in message news:<tyfd63t8558.fsf at pcepsft001.cern.ch>... > I'm looking for ways of creating annotated records of Python > interactive sessions, for documentation purposes.