+
+ self.saveBtn = Button(self, text='Enregistrer', command=self.saveMetadata)
+ self.saveBtn.grid(row=3, column=1, sticky=E)
+
+ def saveMetadata(self):
+ app = self.master.master
+ filepath = app.currentFilePath
+ lfa = LogFileAnalyser(filepath, mode='r+')
+ patientName = '%s\n' % self.nameEntry.get().replace('\n', ' ').strip()
+ comments = '%s\n' % self.commentsText.get(1.0, END).replace('\n', ' ').strip()
+ metadata = (('PatientName', self.nameEntry.get()),
+ ('Comments', comments))
+ lfa.setMetadata(metadata)
+