mailr17702 - /trunk/generic_fns/structure/internal.py


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

Header


Content

Posted by edward on October 05, 2012 - 18:43:
Author: bugman
Date: Fri Oct  5 18:43:11 2012
New Revision: 17702

URL: http://svn.gna.org/viewcvs/relax?rev=17702&view=rev
Log:
Python 3 bug fix for the internal PDB and XYZ 3D structure readers by using 
relax_io.readlines().


Modified:
    trunk/generic_fns/structure/internal.py

Modified: trunk/generic_fns/structure/internal.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/generic_fns/structure/internal.py?rev=17702&r1=17701&r2=17702&view=diff
==============================================================================
--- trunk/generic_fns/structure/internal.py (original)
+++ trunk/generic_fns/structure/internal.py Fri Oct  5 18:43:11 2012
@@ -37,7 +37,7 @@
 from generic_fns.mol_res_spin import Selection
 from generic_fns.structure.api_base import Base_struct_API, ModelList, 
Displacements
 from relax_errors import RelaxError, RelaxNoneIntError, RelaxNoPdbError
-from relax_io import file_root, open_read_file
+from relax_io import file_root, open_read_file, readlines
 from relax_warnings import RelaxWarning
 
 
@@ -262,10 +262,8 @@
         @rtype:             tuple of int and array of str
         """
 
-        # Open the file.
-        file = open_read_file(file_path)
-        lines = file.readlines()
-        file.close()
+        # Read the lines from the file.
+        lines = readlines(file_path)
 
         # Check for empty files.
         if lines == []:
@@ -316,10 +314,8 @@
         @rtype:             tuple of int and array of str
         """
 
-        # Open the file.
-        file = open_read_file(file_path)
-        lines = file.readlines()
-        file.close()
+        # Read the lines from the file.
+        lines = readlines(file_path)
 
         # Check for empty files.
         if lines == []:




Related Messages


Powered by MHonArc, Updated Fri Oct 05 19:40:02 2012