mailr15389 - /1.3/multi/processor_io.py


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

Header


Content

Posted by edward on February 28, 2012 - 15:50:
Author: bugman
Date: Tue Feb 28 15:50:30 2012
New Revision: 15389

URL: http://svn.gna.org/viewcvs/relax?rev=15389&view=rev
Log:
Implemented the flush() method for the multi-processor IO streams.


Modified:
    1.3/multi/processor_io.py

Modified: 1.3/multi/processor_io.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/multi/processor_io.py?rev=15389&r1=15388&r2=15389&view=diff
==============================================================================
--- 1.3/multi/processor_io.py (original)
+++ 1.3/multi/processor_io.py Tue Feb 28 15:50:30 2012
@@ -41,6 +41,14 @@
         # Store the args.
         self.token = token
         self.stream = stream
+
+
+    def flush(self):
+        """Implement the flush() file method."""
+
+        # Flush both STDOUT and STDERR.
+        sys.stdout.flush()
+        sys.stderr.flush()
 
 
     def write(self, string):
@@ -90,6 +98,14 @@
         self.first_time = True
 
 
+    def flush(self):
+        """Implement the flush() file method."""
+
+        # Flush both STDOUT and STDERR.
+        sys.stdout.flush()
+        sys.stderr.flush()
+
+
     def write(self, string):
         """Replacement write() method for prepending the token to each line 
of STDOUT and STDERR.
 




Related Messages


Powered by MHonArc, Updated Tue Feb 28 16:00:02 2012