mailr16047 - in /branches/uf_redesign: prompt/objects.py user_functions/objects.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 - 14:33:
Author: bugman
Date: Mon May  7 14:33:00 2012
New Revision: 16047

URL: http://svn.gna.org/viewcvs/relax?rev=16047&view=rev
Log:
List of lists types are now properly handed by the auto-generated user 
function in prompt/scripts.


Modified:
    branches/uf_redesign/prompt/objects.py
    branches/uf_redesign/user_functions/objects.py

Modified: branches/uf_redesign/prompt/objects.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/prompt/objects.py?rev=16047&r1=16046&r2=16047&view=diff
==============================================================================
--- branches/uf_redesign/prompt/objects.py (original)
+++ branches/uf_redesign/prompt/objects.py Mon May  7 14:33:00 2012
@@ -129,7 +129,6 @@
             can_be_none = arg['can_be_none']
             can_be_empty = arg['can_be_empty']
             none_elements = arg['none_elements']
-            list_of_lists = arg['list_of_lists']
 
             # Check if the correct Python object type has been supplied.
             if py_type == 'bool':
@@ -149,7 +148,7 @@
             elif py_type == 'int_or_int_list':
                 arg_check.is_int_or_int_list(value, desc_short, size=size, 
can_be_none=can_be_none, can_be_empty=can_be_empty, 
none_elements=none_elements)
             elif py_type == 'list':
-                arg_check.is_list(value, desc_short, size=size, 
can_be_none=can_be_none, can_be_empty=can_be_empty, 
list_of_lists=list_of_lists)
+                arg_check.is_list(value, desc_short, size=size, 
can_be_none=can_be_none, can_be_empty=can_be_empty)
             elif py_type == 'none':
                 arg_check.is_none(value, desc_short)
             elif py_type == 'num':
@@ -163,7 +162,9 @@
             elif py_type == 'str':
                 arg_check.is_str(value, desc_short, can_be_none=can_be_none)
             elif py_type == 'str_list':
-                arg_check.is_str_list(value, desc_short, size=size, 
can_be_none=can_be_none, can_be_empty=can_be_empty, 
list_of_lists=list_of_lists)
+                arg_check.is_str_list(value, desc_short, size=size, 
can_be_none=can_be_none, can_be_empty=can_be_empty)
+            elif py_type == 'str_list_of_lists':
+                arg_check.is_str_list(value, desc_short, size=size, 
can_be_none=can_be_none, can_be_empty=can_be_empty, list_of_lists=True)
             elif py_type == 'str_or_inst':
                 arg_check.is_str_or_inst(value, desc_short, 
can_be_none=can_be_none)
             elif py_type == 'str_or_num_or_str_num_list':

Modified: branches/uf_redesign/user_functions/objects.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/user_functions/objects.py?rev=16047&r1=16046&r2=16047&view=diff
==============================================================================
--- branches/uf_redesign/user_functions/objects.py (original)
+++ branches/uf_redesign/user_functions/objects.py Mon May  7 14:33:00 2012
@@ -167,7 +167,7 @@
         self.__dict__[name] = value
 
 
-    def add_keyarg(self, name=None, default=None, py_type=None, 
arg_type=None, size=None, dim=None, desc_short=None, desc=None, 
list_titles=None, wiz_element_type='default', wiz_combo_choices=[], 
wiz_combo_data=None, wiz_combo_default=None, wiz_combo_iter=None, 
wiz_combo_list_size=None, wiz_read_only=None, can_be_none=False, 
can_be_empty=False, none_elements=False, list_of_lists=False):
+    def add_keyarg(self, name=None, default=None, py_type=None, 
arg_type=None, size=None, dim=None, desc_short=None, desc=None, 
list_titles=None, wiz_element_type='default', wiz_combo_choices=[], 
wiz_combo_data=None, wiz_combo_default=None, wiz_combo_iter=None, 
wiz_combo_list_size=None, wiz_read_only=None, can_be_none=False, 
can_be_empty=False, none_elements=False):
         """Wrapper method for adding keyword argument information to the 
container.
 
         @keyword name:                  The name of the argument.
@@ -211,8 +211,6 @@
         @type can_be_empty:             bool
         @keyword none_elements:         A flag which if True allows the 
sequence type object to contain None elements.
         @type none_elements:            bool
-        @keyword list_of_lists:         A flag which if True allows the 
argument to be a list of lists.
-        @type list_of_lists:            bool
         """
 
         # Check that the args have been properly supplied.
@@ -249,4 +247,3 @@
         arg['can_be_none'] = can_be_none
         arg['can_be_empty'] = can_be_empty
         arg['none_elements'] = none_elements
-        arg['list_of_lists'] = list_of_lists




Related Messages


Powered by MHonArc, Updated Mon May 07 14:40:01 2012