mailr3115 - /1.3/data/__init__.py


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

Header


Content

Posted by edward on March 08, 2007 - 06:57:
Author: bugman
Date: Thu Mar  8 06:57:06 2007
New Revision: 3115

URL: http://svn.gna.org/viewcvs/relax?rev=3115&view=rev
Log:
Addition of the 'add()' method to the relax data storage object.

This method will add a new pipe data container to the dictionary using the 
name of the pipe as the
key.


Modified:
    1.3/data/__init__.py

Modified: 1.3/data/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/data/__init__.py?rev=3115&r1=3114&r2=3115&view=diff
==============================================================================
--- 1.3/data/__init__.py (original)
+++ 1.3/data/__init__.py Thu Mar  8 06:57:06 2007
@@ -23,6 +23,9 @@
 # Python module imports.
 from re import match
 from types import DictType
+
+# relax module imports.
+from pipe_container import PipeContainer
 
 
 __all__ = [ 'data_classes',
@@ -115,3 +118,17 @@
 
         # Remove all items from the dictionary.
         self.clear()
+
+
+    def add(self, pipe):
+        """Method for adding a new pipe container to the dictionary.
+
+        This method should be used rather than importing the PipeContainer 
class and using the
+        statement 'D[pipe] = PipeContainer()', where D is the relax data 
storage object and pipe is
+        the name of the data pipe.
+
+        @param pipe:    The name of the new data pipe.
+        @type pipe:     str
+        """
+
+        self[pipe] = PipeContainer()




Related Messages


Powered by MHonArc, Updated Thu Mar 08 07:20:08 2007