Common functions for my Python/PyQt programs