Migliorata la gestione del file temporaneo

This commit is contained in:
Rnhmjoj 2013-03-24 13:37:17 +01:00
parent e8566d829d
commit eb6aa5f773

View File

@ -144,8 +144,8 @@ class applicazione(tkinter.Frame):
#copia il file nel buffer
def aggiorna(self):
self.temp.close()
self.temp = tempfile.TemporaryFile(mode="w+t")
self.temp.seek(0)
self.temp.truncate()
if self.file != "":
with open(self.file) as testo:
self.temp.write(testo.read())