TOOLS/umpv improvements

Seems to work OK with both python2 and python3.