Port mimms to Python 3