X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;ds=sidebyside;f=Storage%2Fbkmk_stpickle.py;h=c4ad32b82ee6c7200db243b1029e9f0403b97a00;hb=71712390f4edb041609ff7bc9272d12a5c1a9b1d;hp=ae351b3bf58af960ebaeeff97354fe3d458ff65f;hpb=0e76f1851882b99da63a7c8a9e4cdf0c4a48657f;p=bookmarks_db.git diff --git a/Storage/bkmk_stpickle.py b/Storage/bkmk_stpickle.py index ae351b3..c4ad32b 100644 --- a/Storage/bkmk_stpickle.py +++ b/Storage/bkmk_stpickle.py @@ -1,9 +1,14 @@ -""" - Bookmarks storage manager - pickle; certainly the most simple and elegant :) +"""Bookmarks storage manager - pickle; certainly the most simple and elegant :) - Written by Broytman, Feb 2000 - Mar 2000. Copyright (C) 2000 PhiloSoft Design +This file is a part of Bookmarks database and Internet robot. """ +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2000-2012 PhiloSoft Design" +__license__ = "GNU GPL" + +__all__ = ['storage_pickle'] + try: import cPickle @@ -16,13 +21,11 @@ except ImportError: class storage_pickle: 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)