mailr4533 - /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:54:
Author: bugman
Date: Wed Jan  9 11:54:11 2008
New Revision: 4533

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

The compression flag has been dropped as it is automatically determined, 
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=4533&r1=4532&r2=4533&view=diff
==============================================================================
--- 1.3/relax_io.py (original)
+++ 1.3/relax_io.py Wed Jan  9 11:54:11 2008
@@ -126,14 +126,23 @@
     return file_path
 
 
-def log(file_name=None, dir=None, compress_type=0, print_flag=1):
-    """Function for turning logging on."""
+def log(file_name=None, dir=None, verbosity=1):
+    """Function for turning logging on.
+
+    @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
+    """
 
     # Log file.
-    log_file, file_path = open_write_file(file_name=file_name, dir=dir, 
force=1, compress_type=compress_type, print_flag=print_flag, return_path=1)
+    log_file, file_path = open_write_file(file_name=file_name, dir=dir, 
force=True, verbosity=verbosity, return_path=True)
 
     # Print out.
-    if print_flag:
+    if verbosity:
         print "Redirecting the sys.stdin IO stream to the python stdin IO 
stream."
         print "Redirecting the sys.stdout IO stream to the log file '%s'." % 
file_path
         print "Redirecting the sys.stderr IO stream to both the python 
stderr IO stream and the log file '%s'." % file_path




Related Messages


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