mailr9353 - /1.3/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 August 21, 2009 - 17:23:
Author: bugman
Date: Fri Aug 21 17:23:56 2009
New Revision: 9353

URL: http://svn.gna.org/viewcvs/relax?rev=9353&view=rev
Log:
Created a base class for the user function classes.

This defines the __init__() method for creating the relax help string.


Added:
    1.3/prompt/base_class.py

Added: 1.3/prompt/base_class.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/prompt/base_class.py?rev=9353&view=auto
==============================================================================
--- 1.3/prompt/base_class.py (added)
+++ 1.3/prompt/base_class.py Fri Aug 21 17:23:56 2009
@@ -1,0 +1,42 @@
+###############################################################################
+#                                                                            
 #
+# Copyright (C) 2009 Edward d'Auvergne                                       
 #
+#                                                                            
 #
+# This file is part of the program relax.                                    
 #
+#                                                                            
 #
+# relax is free software; you can redistribute it and/or modify              
 #
+# it under the terms of the GNU General Public License as published by       
 #
+# the Free Software Foundation; either version 2 of the License, or          
 #
+# (at your option) any later version.                                        
 #
+#                                                                            
 #
+# relax is distributed in the hope that it will be useful,                   
 #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of             
 #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              
 #
+# GNU General Public License for more details.                               
 #
+#                                                                            
 #
+# You should have received a copy of the GNU General Public License          
 #
+# along with relax; if not, write to the Free Software                       
 #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  
 #
+#                                                                            
 #
+###############################################################################
+
+# Module docstring.
+"""The base class for all the user function classes."""
+
+# relax module imports.
+import help
+
+
+class User_fn_class:
+    def __init__(self, relax):
+        """Initialise the user function class, compiling the help string.
+
+        @param relax:   The relax instance.
+        @type relax:    relax instance
+        """
+
+        # Add the generic help string.
+        self.__relax_help__ = self.__doc__ + "\n" + help.relax_class_help
+
+        # Place relax in the class namespace.
+        self.__relax__ = relax




Related Messages


Powered by MHonArc, Updated Fri Aug 21 17:40:03 2009