Author: bugman Date: Tue Jun 5 09:52:34 2012 New Revision: 16656 URL: http://svn.gna.org/viewcvs/relax?rev=16656&view=rev Log: Added the 'bundle_to' arg to the pipe.copy user function back end. This arg is now functional. Modified: branches/uf_redesign/generic_fns/pipes.py Modified: branches/uf_redesign/generic_fns/pipes.py URL: http://svn.gna.org/viewcvs/relax/branches/uf_redesign/generic_fns/pipes.py?rev=16656&r1=16655&r2=16656&view=diff ============================================================================== --- branches/uf_redesign/generic_fns/pipes.py (original) +++ branches/uf_redesign/generic_fns/pipes.py Tue Jun 5 09:52:34 2012 @@ -90,7 +90,7 @@ return list(ds.pipe_bundles.keys()) -def copy(pipe_from=None, pipe_to=None): +def copy(pipe_from=None, pipe_to=None, bundle_to=None): """Copy the contents of the source data pipe to a new target data pipe. If the 'pipe_from' argument is None then the current data pipe is assumed as the source. The @@ -100,6 +100,8 @@ @type pipe_from: str @param pipe_to: The name of the target data pipe to copy the data to. @type pipe_to: str + @keyword bundle_to: The optional data pipe bundle to associate the new data pipe with. + @type bundle_to: str or None """ # Test if the pipe already exists. @@ -119,6 +121,10 @@ # Copy the data. ds[pipe_to] = ds[pipe_from].__clone__() + + # Bundle the pipe. + if bundle_to: + bundle(bundle=bundle_to, pipe=pipe_to) # Release the lock. finally: