mailr17693 - /trunk/relax_io.py


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

Header


Content

Posted by edward on October 03, 2012 - 22:46:
Author: bugman
Date: Wed Oct  3 22:46:34 2012
New Revision: 17693

URL: http://svn.gna.org/viewcvs/relax?rev=17693&view=rev
Log:
Fix to the DummyFileObject to allow Python 2.5 and lower to run relax.

The byte arrays are now placed in eval() statements to allow the 2.5 and 
lower interpreters to parse
the code.


Modified:
    trunk/relax_io.py

Modified: trunk/relax_io.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/relax_io.py?rev=17693&r1=17692&r2=17693&view=diff
==============================================================================
--- trunk/relax_io.py (original)
+++ trunk/relax_io.py Wed Oct  3 22:46:34 2012
@@ -1045,11 +1045,11 @@
             self._newline = '\n'
             self._empty = ''
 
-        # Initialise for Python 3.
+        # Initialise for Python 3 (inside a eval statements to allow Python 
2.5 and lower to parse this and run).
         elif py_version == 3:
-            self.data = b''
-            self._newline = b'\n'
-            self._empty = b''
+            self.data = eval("b''")
+            self._newline = eval("b'\n'")
+            self._empty = eval("b''")
 
         # Set the closed flag.
         self.closed = False




Related Messages


Powered by MHonArc, Updated Thu Oct 04 10:20:02 2012