Convert print statements to Python 3 style

Ran "2to3 -w -n -f print ./" and manually added imports.
Ran "^\s*print " and "\s+print " to find batch/shell scripts, comments and the like with embedded code, and updated them manually.
Also manually added imports to files, which used print as a function, but were missing the import.

The scripts still work with Python 2.
There are no intended behaviour changes.

Bug: 942522
Change-Id: Id777e4d4df4adcdfdab1b18bde89f235ef491b9f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1595684
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Auto-Submit: Raul Tambre <raul@tambre.ee>
diff --git a/checkout.py b/checkout.py
index 685d2f7..2bcf984 100644
--- a/checkout.py
+++ b/checkout.py
@@ -7,6 +7,8 @@
 Includes support only for git.
 """
 
+from __future__ import print_function
+
 import fnmatch
 import logging
 import os
@@ -288,8 +290,8 @@
         for post in post_processors:
           post(self, p)
         if verbose:
-          print p.filename
-          print align_stdout(stdout)
+          print(p.filename)
+          print(align_stdout(stdout))
       except OSError, e:
         errors.append((p, '%s%s' % (align_stdout(stdout), e)))
       except subprocess.CalledProcessError, e:
@@ -307,9 +309,9 @@
       extra_files = sorted(set(found_files) - set(patches.filenames))
       unpatched_files = sorted(set(patches.filenames) - set(found_files))
       if extra_files:
-        print 'Found extra files: %r' % (extra_files,)
+        print('Found extra files: %r' % extra_files)
       if unpatched_files:
-        print 'Found unpatched files: %r' % (unpatched_files,)
+        print('Found unpatched files: %r' % unpatched_files)
 
 
   def commit(self, commit_message, user):