mailr4544 - /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 January 09, 2008 - 14:24:
Author: bugman
Date: Wed Jan  9 14:24:45 2008
New Revision: 4544

URL: http://svn.gna.org/viewcvs/relax?rev=4544&view=rev
Log:
Bug fix.  The relax_io.determine_compression() function now returns the full 
file path.


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=4544&r1=4543&r2=4544&view=diff
==============================================================================
--- 1.3/relax_io.py (original)
+++ 1.3/relax_io.py Wed Jan  9 14:24:45 2008
@@ -63,10 +63,10 @@
 
     @param file_path:   The full file path of the file.
     @type file_path:    str
-    @return:            The compression type.  A value of 0 corresponds to 
no compression.  Bzip2
-                        compression corresponds to a value of 1.  Gzip 
compression corresponds to a
-                        value of 2.
-    @type return:       int
+    @return:            A tuple of the compression type and full path of the 
file (including its
+                        extension).  A value of 0 corresponds to no 
compression.  Bzip2 compression
+                        corresponds to a value of 1.  Gzip compression 
corresponds to a value of 2.
+    @type return:       (int, str)
     """
 
     # The file has been supplied without its compression extension.
@@ -92,7 +92,7 @@
         raise RelaxFileError, file_path
 
     # Return the compression type.
-    return compress_type
+    return compress_type, file_path
 
 
 def extract_data(file_name=None, dir=None, file_data=None, sep=None):
@@ -238,7 +238,7 @@
     file_path = get_file_path(file_name, dir)
 
     # Test if the file exists and determine the compression type.
-    compress_type = determine_compression(file_path)
+    compress_type, file_path = determine_compression(file_path)
 
     # Open the file for reading.
     try:




Related Messages


Powered by MHonArc, Updated Wed Jan 09 14:40:12 2008