mailr15937 - /branches/uf_redesign/prompt/objects.py


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

Header


Content

Posted by edward on May 03, 2012 - 22:27:
Author: bugman
Date: Thu May  3 22:27:10 2012
New Revision: 15937

URL: http://svn.gna.org/viewcvs/relax?rev=15937&view=rev
Log:
The __description__ attribute from the old help system is now supported in 
the auto-generated classes.


Modified:
    branches/uf_redesign/prompt/objects.py

Modified: branches/uf_redesign/prompt/objects.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/prompt/objects.py?rev=15937&r1=15936&r2=15937&view=diff
==============================================================================
--- branches/uf_redesign/prompt/objects.py (original)
+++ branches/uf_redesign/prompt/objects.py Thu May  3 22:27:10 2012
@@ -24,6 +24,7 @@
 """Module containing the special objects for auto-generating the user 
functions and classes."""
 
 # relax module imports.
+from prompt.base_class import _strip_lead
 from prompt.help import relax_class_help
 
 
@@ -46,6 +47,10 @@
         self.__relax_help__ = desc
         self.__relax_help__ += "\n%s" % relax_class_help
 
+        # Add a description to the help string.
+        if hasattr(self, '__description__'):
+            self.__relax_help__ += "\n\n%s" % 
_strip_lead(self.__description__)
+
 
     def __repr__(self):
         """Replacement function for displaying an instance of this user 
function class."""




Related Messages


Powered by MHonArc, Updated Thu May 03 22:40:02 2012