mailr7461 - /branches/pipe_refs/generic_fns/pipes.py


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

Header


Content

Posted by edward on September 30, 2008 - 17:40:
Author: bugman
Date: Tue Sep 30 17:40:37 2008
New Revision: 7461

URL: http://svn.gna.org/viewcvs/relax?rev=7461&view=rev
Log:
Created the has_pipe() function for the pipes API.


Modified:
    branches/pipe_refs/generic_fns/pipes.py

Modified: branches/pipe_refs/generic_fns/pipes.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/pipe_refs/generic_fns/pipes.py?rev=7461&r1=7460&r2=7461&view=diff
==============================================================================
--- branches/pipe_refs/generic_fns/pipes.py (original)
+++ branches/pipe_refs/generic_fns/pipes.py Tue Sep 30 17:40:37 2008
@@ -159,6 +159,22 @@
     return pipe.pipe_type
 
 
+def has_pipe(name):
+    """Determine if the relax data store contains the data pipe.
+
+    @param name:    The name of the data pipe.
+    @type name:     str
+    @return:        True if the data pipe exists, False otherwise.
+    @rtype:         bool
+    """
+
+    # Check.
+    if ds.has_key(name):
+        return True
+    else:
+        return False
+
+
 def list():
     """Print the details of all the data pipes."""
 




Related Messages


Powered by MHonArc, Updated Tue Sep 30 18:00:08 2008