# HG changeset patch
# User Edouard TISSERANT <edouard.tisserant@gmail.com>
# Date 1260971616 -3600
# Node ID 61e6f03328de381a7893d7d05ce6380ba8215020
# Parent  e43bc748d1feef416b94d0e14ddfa112394dd39c# Parent  2a3ab252b4e0f59e074d179543e36ef3b5042089
merge

diff -r e43bc748d1fe -r 61e6f03328de LPCBeremiz.py
--- a/LPCBeremiz.py	Wed Dec 16 14:51:28 2009 +0100
+++ b/LPCBeremiz.py	Wed Dec 16 14:53:36 2009 +0100
@@ -804,6 +804,7 @@
         self.KillLocalRuntime()
         
         print "Closed"
+        sys.stdout.flush()
         
         event.Skip()
 
@@ -1301,6 +1302,7 @@
             args_toks = line.split('"')
             if len(args_toks) % 2 == 0:
                 print "Error: Invalid command"
+                sys.stdout.flush()
                 return
             args = []
             for num, arg in enumerate(args_toks):
@@ -1327,16 +1329,19 @@
                     print "Error: 1 argument%s expected" % extra
                 else:
                     print "Error: %d arguments%s expected" % (number, extra)
+                sys.stdout.flush()
                 return
             for num, arg in enumerate(args):
                 try:
                     args[num] = arg_types[num](arg)
                 except:
                     print "Error: Invalid value for argument %d" % (num + 1)
+                    sys.stdout.flush()
                     return
             res = getattr(self, function)(*args)
             if isinstance(res, (StringType, UnicodeType)):
                 print res
+                sys.stdout.flush()
                 return False
             else:
                 return res