mailr4535 - /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 - 11:58:
Author: bugman
Date: Wed Jan  9 11:58:30 2008
New Revision: 4535

URL: http://svn.gna.org/viewcvs/relax?rev=4535&view=rev
Log:
Updated the relax_io.open_read_file() function.

Changed the 'print_flag' arg to 'verbosity' and updated the docstring to 
epydoc format.


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=4535&r1=4534&r2=4535&view=diff
==============================================================================
--- 1.3/relax_io.py (original)
+++ 1.3/relax_io.py Wed Jan  9 11:58:30 2008
@@ -178,8 +178,19 @@
             print "Directory ./" + dir + " already exists.\n"
 
 
-def open_read_file(file_name=None, dir=None, compress_type=0, print_flag=1):
-    """Open the file 'file' and return all the data."""
+def open_read_file(file_name=None, dir=None, verbosity=1):
+    """Open the file 'file' and return all the data.
+
+    @param file_name:   The name of the file to extract the data from.
+    @type file_name:    str
+    @param dir:         The path where the file is located.  If None, then 
the current directory is
+                        assumed.
+    @type dir:          str
+    @param verbosity:   The verbosity level.
+    @type verbosity:    int
+    @return:            The open file object.
+    @type return:       file object
+    """
 
     # A file descriptor object.
     if type(file_name) == file:
@@ -207,7 +218,7 @@
 
     # Open the file for reading.
     try:
-        if print_flag:
+        if verbosity:
             print "Opening the file " + `file_path` + " for reading."
         if compress_type == 0:
             file_obj = open(file_path, 'r')




Related Messages


Powered by MHonArc, Updated Wed Jan 09 12:20:11 2008