Mostly a port of 1.2.4 to Python 3.x, with bug fixes as necessary and perhaps some minor enhancements.