diff utils.py @ 9:8c20185752da

better logging
author pieter.lukasse@wur.nl
date Thu, 22 Jan 2015 22:14:23 +0100
parents cce6989ed423
children c21e96bb68c8
line wrap: on
line diff
--- a/utils.py	Thu Jan 22 22:07:40 2015 +0100
+++ b/utils.py	Thu Jan 22 22:14:23 2015 +0100
@@ -11,7 +11,10 @@
 def copy_dir(src, dst):
     shutil.copytree(src, dst)
 
-    
+def log_message(log_file, log_message):
+    with open(log_file, "a") as text_file:
+        text_file.write(log_message + "\n")
+        
 def copy_file(src, dst):  
     shutil.copy(src, dst)