A Python module for controlling interactive programs in a pseudo-terminal