Disabled logging commands into files
authorLolitech
Fri, 04 Jun 2010 14:58:24 +0200
changeset 555 7b08cc1ea55a
parent 554 6bd3f220b886
child 556 1ad4e7f1e89e
Disabled logging commands into files
LPCBeremiz.py
--- a/LPCBeremiz.py	Fri Jun 04 14:58:03 2010 +0200
+++ b/LPCBeremiz.py	Fri Jun 04 14:58:24 2010 +0200
@@ -1123,7 +1123,7 @@
 
     # Command log for debug, for viewing from wxInspector
     __builtins__.cmdlog = []
-    cmdlogf=open("bmzcmdlog.txt","w")
+    #cmdlogf=open("bmzcmdlog.txt","w")
 
     class LPCBeremiz_Cmd(cmd.Cmd):
         
@@ -1411,13 +1411,16 @@
                     sys.stdout.flush()
                     return
 
-            cmdlogf.write(str((function,line))+'\n')
-
+            #cmdlogf.write(str((function,line))+'\n')
+            #cmdlogf.flush()
+            
             func = getattr(self, function)
             res = evaluator(func,*args)
 
             # Keep log for debug
-            cmdlogf.write("--->"+str(res)+'\n')
+            #cmdlogf.write("--->"+str(res)+'\n')
+            #cmdlogf.flush()
+
             cmdlog.append((function,line,res))
             if len(cmdlog) > 100: #prevent debug log to grow too much
                 cmdlog.pop(0)