Author: bugman Date: Wed Oct 1 13:44:12 2008 New Revision: 7474 URL: http://svn.gna.org/viewcvs/relax?rev=7474&view=rev Log: Created a new pipes API function, the pipe_loop(). 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=7474&r1=7473&r2=7474&view=diff ============================================================================== --- branches/pipe_refs/generic_fns/pipes.py (original) +++ branches/pipe_refs/generic_fns/pipes.py Wed Oct 1 13:44:12 2008 @@ -186,6 +186,18 @@ print "%-20s%-20s" % (pipe_name, get_type(pipe_name)) +def pipe_loop(): + """Generator function for looping over and yielding the data pipes. + + @return: The data pipes. + @rtype: PipeContainer instance + """ + + # Loop over the keys. + for name in ds.keys(): + yield ds[name] + + def pipe_names(): """Return the list of all data pipes.