An enhanced version of the tty module