Author: bugman Date: Tue Sep 30 00:09:23 2008 New Revision: 7449 URL: http://svn.gna.org/viewcvs/relax?rev=7449&view=rev Log: Created the new function get_type() for returning the type of the data pipe. 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=7449&r1=7448&r2=7449&view=diff ============================================================================== --- branches/pipe_refs/generic_fns/pipes.py (original) +++ branches/pipe_refs/generic_fns/pipes.py Tue Sep 30 00:09:23 2008 @@ -140,6 +140,22 @@ return ds[name] +def get_type(name=None): + """Return the type of the data pipe. + + @keyword name: The name of the data pipe. If None, the current data pipe is used. + @type name: str or None + @return: The current data pipe type. + @rtype: str + """ + + # The name of the data pipe. + if name == None: + name = ds.current_pipe + + return ds[name].pipe_type + + def list(): """Print the details of all the data pipes."""