mailr13478 - /branches/gui_testing/prompt/base_class.py


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

Header


Content

Posted by edward on July 07, 2011 - 11:20:
Author: bugman
Date: Thu Jul  7 11:20:34 2011
New Revision: 13478

URL: http://svn.gna.org/viewcvs/relax?rev=13478&view=rev
Log:
The _build_doc() function now creates a dictionary version of _doc_args if it 
exists.

This will allows the GUI and other UI elements to easily obtain the argument 
descriptions.


Modified:
    branches/gui_testing/prompt/base_class.py

Modified: branches/gui_testing/prompt/base_class.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/prompt/base_class.py?rev=13478&r1=13477&r2=13478&view=diff
==============================================================================
--- branches/gui_testing/prompt/base_class.py (original)
+++ branches/gui_testing/prompt/base_class.py Thu Jul  7 11:20:34 2011
@@ -82,6 +82,16 @@
             fn.__doc__ = fn.__doc__ + '\n' + 
_build_subtitle(fn._doc_additional[i][0])
             fn.__doc__ = fn.__doc__ + _format_text(fn._doc_additional[i][1])
 
+    # Convert the _doc_args list into a dictionary for easy argument 
description retrieval.
+    if hasattr(fn, '_doc_args'):
+        # Init.
+        fn._doc_args_dict = {}
+
+        # Loop over the args.
+        for arg, desc in fn._doc_args:
+            fn._doc_args_dict[arg] = desc
+
+
 
 def _build_subtitle(text):
     """Create the formatted subtitle string.




Related Messages


Powered by MHonArc, Updated Thu Jul 07 12:00:02 2011