Kiva Editor's Assistant /

Diff from to


 import StringIO
 import codecs
 import logging
+import os
+import sys
 import tempfile
-import sys
 from clipboard import get_clipboard_text, set_clipboard_text
 from base import Token
     errors in Kiva loan descriptions.
-    # Initialize logging to go to a file
-    handler = logging.FileHandler("kea.log", "w", encoding="UTF-8")
+    # Initialize logging to go to a temporary file
+    temp_file_name = os.path.join(tempfile.gettempdir(), "kea.log")
+    handler = logging.FileHandler(temp_file_name, "w", encoding="UTF-8")
     formatter = logging.Formatter("%(message)s")
     root_logger = logging.getLogger()