def save(self):
        if self.totals and self.tokens:
            f = open(self.filename, 'wb')
            fcntl.flock(f.fileno(), fcntl.LOCK_EX)
            pickle.dump([self.totals, self.tokens], f, -1)
            f.close()
        self.save_count = 0
Save data to file
dataset/ETHPy150Open dchest/pybayesantispam/bayes.py/Storage.save