mailr10835 - /branches/multi_processor_merge/multi/prependStringIO.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on February 23, 2010 - 02:26:
Author: bugman
Date: Tue Feb 23 02:26:46 2010
New Revision: 10835

URL: http://svn.gna.org/viewcvs/relax?rev=10835&view=rev
Log:
PrependOut.write() now flushes both STDOUT and STDERR giving perfect 
interleaving of the 2 streams.


Modified:
    branches/multi_processor_merge/multi/prependStringIO.py

Modified: branches/multi_processor_merge/multi/prependStringIO.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/multi_processor_merge/multi/prependStringIO.py?rev=10835&r1=10834&r2=10835&view=diff
==============================================================================
--- branches/multi_processor_merge/multi/prependStringIO.py (original)
+++ branches/multi_processor_merge/multi/prependStringIO.py Tue Feb 23 
02:26:46 2010
@@ -98,9 +98,12 @@
         # Append the token to all newline chars.
         string = string.replace('\n', '\n' + self.token)
 
-        # Write the string to the stream and flush.
+        # Write the string to the stream.
         self.stream.write(string)
-        self.stream.flush()
+
+        # Flush both STDOUT and STDERR.
+        sys.__stdout__.flush()
+        sys.__stderr__.flush()
 
 
 #TODO: maybe this hsould be a delegate to a stringio rather than being a 
stringio as this will speed things up and simplify things




Related Messages


Powered by MHonArc, Updated Tue Feb 23 02:40:03 2010