mailr6507 - /1.3/relax_io.py


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

Header


Content

Posted by edward on June 28, 2008 - 17:43:
Author: bugman
Date: Sat Jun 28 17:24:28 2008
New Revision: 6507

URL: http://svn.gna.org/viewcvs/relax?rev=6507&view=rev
Log:
Added a readlines() method to the dummy file object.


Modified:
    1.3/relax_io.py

Modified: 1.3/relax_io.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/relax_io.py?rev=6507&r1=6506&r2=6507&view=diff
==============================================================================
--- 1.3/relax_io.py (original)
+++ 1.3/relax_io.py Sat Jun 28 17:24:28 2008
@@ -451,6 +451,17 @@
         self.data = self.data + str
 
 
+    def readlines(self):
+        """Mimic the file object readlines() method.
+
+        @return:    The contents of the file object separated by newline 
characters.
+        @rtype:     list of str
+        """
+
+        # Return the split up string.
+        return split(self.data, '\n')
+
+
 
 class IO:
     def __init__(self, relax):




Related Messages


Powered by MHonArc, Updated Sat Jun 28 18:00:19 2008