Commits

Lars Yencken committed 1b74d18

Removes automatic dumping of the reading model on exit.

Comments (0)

Files changed (1)

src/reading_model.py

 #  Copyright 2005-2010 Lars Yencken. All rights reserved.
 # 
 
-from os import path
-import cPickle as pickle
-
 from cjktools import scripts, enum, alternations
 from cjktools.resources import kanjidic
 from simplestats.sequences import flatten
 
-import settings
-
 #----------------------------------------------------------------------------#
 
 class PathException(Exception): pass
 
         self._readings, self._pool, self._okuri = model
 
-        return
-
     #------------------------------------------------------------------------#
 
     def prune_alignments(self, ambiguous_entries):
 
     #------------------------------------------------------------------------#
 
-    def __del__(self):
-        """ Dumps the model upon leaving.
-        """
-        ostream = open(path.join(settings.DATA_DIR, 'reading_model.pickle'),
-                'w')
-        model = self._readings, self._pool, self._okuri
-        pickle.dump(model, ostream)
-        ostream.close()
-
-    #------------------------------------------------------------------------#
-
 #----------------------------------------------------------------------------#