فهرست منبع

Apply lib2to3.fixes.print

Gary van der Merwe 11 سال پیش
والد
کامیت
a86e3d9452
4فایلهای تغییر یافته به همراه8 افزوده شده و 8 حذف شده
  1. 1 1
      docs/conf.py
  2. 1 1
      examples/clone.py
  3. 2 2
      examples/config.py
  4. 4 4
      examples/latest_change.py

+ 1 - 1
docs/conf.py

@@ -30,7 +30,7 @@ try:
     if rst2pdf.version >= '0.16':
         extensions.append('rst2pdf.pdfbuilder')
 except ImportError:
-    print "[NOTE] In order to build PDF you need rst2pdf with version >=0.16"
+    print("[NOTE] In order to build PDF you need rst2pdf with version >=0.16")
 
 
 autoclass_content = "both"

+ 1 - 1
examples/clone.py

@@ -13,7 +13,7 @@ opts, args = getopt(sys.argv, "", [])
 opts = dict(opts)
 
 if len(args) < 2:
-    print "usage: %s host:path path" % (args[0], )
+    print("usage: %s host:path path" % (args[0], ))
     sys.exit(1)
 
 # Connect to the remote repository

+ 2 - 2
examples/config.py

@@ -9,5 +9,5 @@ from dulwich.repo import Repo
 repo = Repo(".")
 config = repo.get_config()
 
-print config.get("core", "filemode")
-print config.get(("remote", "origin"), "url")
+print(config.get("core", "filemode"))
+print(config.get(("remote", "origin"), "url"))

+ 4 - 4
examples/latest_change.py

@@ -6,7 +6,7 @@ import time
 from dulwich.repo import Repo
 
 if len(sys.argv) < 2:
-    print "usage: %s filename" % (sys.argv[0], )
+    print("usage: %s filename" % (sys.argv[0], ))
     sys.exit(1)
 
 r = Repo(".")
@@ -15,7 +15,7 @@ w = r.get_walker(paths=[sys.argv[1]], max_entries=1)
 try:
     c = iter(w).next().commit
 except StopIteration:
-    print "No file %s anywhere in history." % sys.argv[1]
+    print("No file %s anywhere in history." % sys.argv[1])
 else:
-    print "%s was last changed at %s by %s (commit %s)" % (
-        sys.argv[1], c.author, time.ctime(c.author_time), c.id)
+    print("%s was last changed at %s by %s (commit %s)" % (
+        sys.argv[1], c.author, time.ctime(c.author_time), c.id))