Merge "ported tools/*.py scripts to python3"