]> git.phdru.name Git - bookmarks_db.git/blobdiff - sort_db.py
Update TODO: Prepare for Python 3
[bookmarks_db.git] / sort_db.py
index 014fcaeb505fe93d0a6c479a3aa19bd635cb5a38..9a478bf75c394513411e762c2ccc2cdb9d4a30cf 100755 (executable)
@@ -9,19 +9,17 @@
       -r - reverse the sort order
 
 This file is a part of Bookmarks database and Internet robot.
+
 """
 
-__version__ = "$Revision$"[11:-2]
-__revision__ = "$Id$"[5:-2]
-__date__ = "$Date$"[7:-2]
 __author__ = "Oleg Broytman <phd@phdru.name>"
-__copyright__ = "Copyright (C) 2000-2011 PhiloSoft Design"
+__copyright__ = "Copyright (C) 2000-2017 PhiloSoft Design"
 __license__ = "GNU GPL"
 
 import sys
 
 
-class SortBy:
+class SortBy(object):
    def __init__(self, sort_by):
       self.sort_by = sort_by
 
@@ -83,7 +81,7 @@ def run():
    root_folder = storage.load()
 
    if report_stats:
-      print "Ok"
+      print("Ok")
       sys.stdout.write("Sorting (by %s): " % sort_by)
       sys.stdout.flush()
 
@@ -104,7 +102,7 @@ def run():
       output_filename = output_filename + "-reverse"
 
    if report_stats:
-      print "done"
+      print("done")
       sys.stdout.write("Writing %s: " % output_filename)
       sys.stdout.flush()
 
@@ -115,7 +113,7 @@ def run():
    outfile.close()
 
    if report_stats:
-      print "Ok"
+      print("Ok")
 
 
 if __name__ == '__main__':