[GRASS-SVN] r55568 - grass/trunk/lib/python/script

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Mar 28 09:54:46 PDT 2013


Author: martinl
Date: 2013-03-28 09:54:46 -0700 (Thu, 28 Mar 2013)
New Revision: 55568

Modified:
   grass/trunk/lib/python/script/core.py
Log:
pythonlib: compare_key_value_text_files() - remove print statements
           update doxygen


Modified: grass/trunk/lib/python/script/core.py
===================================================================
--- grass/trunk/lib/python/script/core.py	2013-03-28 16:53:54 UTC (rev 55567)
+++ grass/trunk/lib/python/script/core.py	2013-03-28 16:54:46 UTC (rev 55568)
@@ -660,35 +660,32 @@
 def compare_key_value_text_files(filename_a, filename_b, sep=":",
                                  val_sep=",", precision=0.000001):
     """
-        !Compare two key-value text files that contain projection parameter
+    !Compare two key-value text two files 
 
-        @param filename_a The name of the first key-value text file
-        @param filenmae_b The name of the second key-value text file
-        @param sep The character that separates the keys and values, default is ":"
-        @param val_sep The character that separates the values of a single key, default is ","
-        @param precision The precision with which the floating point values are compares
-           if abs(a - b) > precision : return False
-        @return True if full or almost identical, False if different
+    This method will print a warning in case keys that are present in the first file
+    are not present in the second one.
+    The comparison method tries to convert the values into there native format (float, int or string)
+    to allow correct comparison.
 
-        This method will print a warning in case keys that are present in the first file
-        are not present in the second one.
-        The comparison method tries to convert the values into there native format (float, int or string)
-        to allow correct comparison.
+    An example key-value text file may have this content:
+    \code
+    a: Hello
+    b: 1.0
+    c: 1,2,3,4,5
+    d : hello,8,0.1
+    \endcode
+    
+    @param filename_a name of the first key-value text file
+    @param filenmae_b name of the second key-value text file
+    @param sep character that separates the keys and values, default is ":"
+    @param val_sep character that separates the values of a single key, default is ","
+    @param precision precision with which the floating point values are compares
 
-        An example key-value text file may have this content:
-        \code
-        a: Hello
-        b: 1.0
-        c: 1,2,3,4,5
-        d : hello,8,0.1
-        \endcode
+    @return True if full or almost identical, False if different
     """
     dict_a = _text_to_key_value_dict(filename_a, sep)
     dict_b = _text_to_key_value_dict(filename_b, sep)
     
-    print dict_a
-    print dict_b
-
     missing_keys = 0
 
     # We compare matching keys



More information about the grass-commit mailing list