X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=Storage%2Fbkmk_stpickle.py;h=444cf35c3395d9a851c09284d4e63fe85d90fcc6;hb=53d4a2383cfef1310871eefcc14e6e1950b96853;hp=2ed61d3f5c72845e191f6e53a3df4598c7089eaa;hpb=fb5c3b2b91aeeb615d6d6d890491af3fdff69556;p=bookmarks_db.git diff --git a/Storage/bkmk_stpickle.py b/Storage/bkmk_stpickle.py index 2ed61d3..444cf35 100644 --- a/Storage/bkmk_stpickle.py +++ b/Storage/bkmk_stpickle.py @@ -1,9 +1,15 @@ -""" - Bookmarks storage manager - pickle; certainly the most simple and elegant :) +"""Bookmarks storage manager - pickle; certainly the most simple and elegant :) + +This file is a part of Bookmarks database and Internet robot. - Written by BroytMann, Feb 2000 - Mar 2000. Copyright (C) 2000 PhiloSoft Design """ +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2000-2014 PhiloSoft Design" +__license__ = "GNU GPL" + +__all__ = ['storage_pickle'] + try: import cPickle @@ -13,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)