Make mtlib Python 3 compatible

Most changes were generated using `futurize`:

    $ futurize --stage1 --all-imports --write --nobackups mtlib/**/*.py

Then the `__future__` imports were sorted, an issue with `Path` division
overloading fixed, and a few out-of-date imports replaced or removed.

TEST=Run `mtedit` on a local ZIP file using 2.7; where imports have been
     changed, check that objects in those files can still be imported in
     a 2.7 REPL. Check that `import mtlib` in a Python 3 REPL doesn't
     fail with any errors in mtlib. (It will fail with errors in
     `touch_firmware_test/`, but that's out of scope of this CL.)
BUG=None

Change-Id: I208ac77516ce96118e3d51d226f990693b9a3931
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/mttools/+/2018104
Tested-by: Harry Cutts <hcutts@chromium.org>
Reviewed-by: Sean O'Brien <seobrien@chromium.org>
Commit-Queue: Harry Cutts <hcutts@chromium.org>
10 files changed
tree: 31381af7e1eb96be0e21f72623acb4966959c1ca
  1. mtbringup/
  2. mtedit/
  3. mtlib/
  4. mtreplay/
  5. mtstat/
  6. platforms/
  7. .gitignore
  8. __init__.py
  9. common.mk
  10. Makefile
  11. OWNERS
  12. PRESUBMIT.cfg