X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=Storage%2Fbkmk_stpickle.py;h=444cf35c3395d9a851c09284d4e63fe85d90fcc6;hb=81873ddfe025bafe27d55f13b1de47e69b95384a;hp=702cea58ffc2a3735a63bfe540feea7fe6021f82;hpb=832eb757ef7f81abf1e431ce16f368c10dd57962;p=bookmarks_db.git diff --git a/Storage/bkmk_stpickle.py b/Storage/bkmk_stpickle.py index 702cea5..444cf35 100644 --- a/Storage/bkmk_stpickle.py +++ b/Storage/bkmk_stpickle.py @@ -1,15 +1,16 @@ """Bookmarks storage manager - pickle; certainly the most simple and elegant :) 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 " -__copyright__ = "Copyright (C) 2000-2011 PhiloSoft Design" +__copyright__ = "Copyright (C) 2000-2014 PhiloSoft Design" __license__ = "GNU GPL" +__all__ = ['storage_pickle'] + + try: import cPickle pickle = cPickle @@ -18,16 +19,14 @@ except ImportError: import pickle -class storage_pickle: +class storage_pickle(object): filename = "bookmarks_db.pickle" - def store(self, root_folder): outfile = open(self.filename, 'wb') pickle.dump(root_folder, outfile, 1) outfile.close() - def load(self): infile = open(self.filename, 'rb') root_folder = pickle.load(infile)