Example #1
0
 def __init__(self, base_data_dir, data_name):
     data_file = os.path.join(base_data_dir, data_name.replace(".", "/")) + ".dp"
     data_dir = os.path.dirname(data_file)
     if not os.path.exists(data_dir):
         os.makedirs(data_dir)
     if not os.path.exists(data_file):
         whisper.create(data_file, self.archives)
     self.data_file = data_file
Example #2
0
 def purge(self):
     os.unlink(self.data_file)
     whisper.create(self.data_file, self.archives)