mailr16038 - /branches/uf_redesign/generic_fns/relax_data.py


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

Header


Content

Posted by edward on May 07, 2012 - 11:47:
Author: bugman
Date: Mon May  7 11:47:19 2012
New Revision: 16038

URL: http://svn.gna.org/viewcvs/relax?rev=16038&view=rev
Log:
Created the generic_fns.relax_data.get_ids() function for returning all 
relaxation data IDs.

This is needed for the auto-generated user functions in the GUI.


Modified:
    branches/uf_redesign/generic_fns/relax_data.py

Modified: branches/uf_redesign/generic_fns/relax_data.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/generic_fns/relax_data.py?rev=16038&r1=16037&r2=16038&view=diff
==============================================================================
--- branches/uf_redesign/generic_fns/relax_data.py (original)
+++ branches/uf_redesign/generic_fns/relax_data.py Mon May  7 11:47:19 2012
@@ -576,6 +576,25 @@
 
     # Return the list of names.
     return names
+
+
+def get_ids():
+    """Return the list of all relaxation data IDs.
+
+    @return:        The list of all relaxation data IDs.
+    @rtype:         list of str
+    """
+
+    # No pipe.
+    if cdp == None:
+        return []
+
+    # No relaxation data.
+    if not hasattr(cdp, 'ri_ids'):
+        return []
+
+    # The relaxation data IDs.
+    return cdp.ri_ids
 
 
 def num_frq():




Related Messages


Powered by MHonArc, Updated Mon May 07 12:20:01 2012