Termdebug is a set of utilities for recording and replaying the input and output of terminal programs. Its main goal is to aid in developing and debugging terminal programs. Other programs such as termrec/termplay, nethack-recorder/player, and script/scriptreplay only record the output. However, when debugging an interactive terminal program, the input is often as important as the output.
python-tracing provides the Python library "tracing" to help with logging debug messages. This module provides a couple of functions for logging debug messages. It is sometimes practical to add a lot of debugging log messages to a program, but having them enabled all the time results in very large log files. Also, logging that much takes quite a bit of time. This module provides a way to turn such debugging or tracing messages on and off, based on the filename in which they occur.