CherryPy_subhandler /

Diff from to


         import setuptools
         if setuptools.__version__ == '0.0.1':
-            print >>sys.stderr, (
+            sys.stderr.write(
             "You have an obsolete version of setuptools installed.  Please\n"
             "remove it from your system entirely before rerunning this script."
     except pkg_resources.VersionConflict:
         # XXX could we install in a subprocess here?
-        print >>sys.stderr, (
+        sys.stderr.write(
             "The required version of setuptools (>=%s) is not available, and\n"
             "can't be installed while this script is running. Please install\n"
             " a more recent version first."
     as an egg for download under the `download_base` URL (which should end
     with a '/'). `to_dir` is the directory where the egg will be downloaded.
-    import urllib2, shutil
+    from urllib2 import urlopen
+    import shutil
     egg_name = "setuptools-%s-py%s.egg" % (version,sys.version[:3])
     url = download_base + egg_name + '.zip'  # XXX
     saveto = os.path.join(to_dir, egg_name)
             from distutils import log
             log.warn("Downloading %s", url)
-            src = urllib2.urlopen(url)
+            src = urlopen(url)
             # Read/write all in one block, so we don't create a corrupt file
             # if the download is interrupted.
             data =
             from setuptools.command.easy_install import main
-            print "Setuptools version",version,"or greater has been installed."
-            print '(Run " -U setuptools" to reinstall or upgrade.)'
+            print("Setuptools version",version,"or greater has been installed.")
+            print('(Run " -U setuptools" to reinstall or upgrade.)')
 if __name__=='__main__':