Author: bugman Date: Sat May 5 22:44:15 2012 New Revision: 16013 URL: http://svn.gna.org/viewcvs/relax?rev=16013&view=rev Log: Created the align_tensor.get_ids() method for use in the GUI wizards. This will be required for the auto-generated user function GUI front ends. Modified: branches/uf_redesign/generic_fns/align_tensor.py Modified: branches/uf_redesign/generic_fns/align_tensor.py URL: http://svn.gna.org/viewcvs/relax/branches/uf_redesign/generic_fns/align_tensor.py?rev=16013&r1=16012&r2=16013&view=diff ============================================================================== --- branches/uf_redesign/generic_fns/align_tensor.py (original) +++ branches/uf_redesign/generic_fns/align_tensor.py Sat May 5 22:44:15 2012 @@ -586,6 +586,25 @@ return gdo +def get_ids(): + """Return the list of all alignment tensor IDs. + + @return: The list of all alignment tensors. + @rtype: list of str + """ + + # No pipe. + if cdp == None: + return [] + + # No tensor data. + if not hasattr(cdp, 'align_ids'): + return [] + + # The tensor IDs. + return cdp.align_ids + + def get_tensor_index(tensor, pipe=None): """Function for returning the index corresponding to the 'tensor' argument.