From eb6aa5f7730eafcbd79174329ce9d98eb9d0887d Mon Sep 17 00:00:00 2001 From: Rnhmjoj Date: Sun, 24 Mar 2013 13:37:17 +0100 Subject: [PATCH] Migliorata la gestione del file temporaneo --- Dropchat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dropchat.py b/Dropchat.py index 21f529a..9b11e79 100644 --- a/Dropchat.py +++ b/Dropchat.py @@ -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())