parameters: (self, text)
docstring: Read the string 'text' and updates self
docstring_summary: Read the string 'text' and updates self
docstring_tokens: Read the string text and updates self
function: def DA_fromText(self, text):
    """
      Read the string 'text' and updates self
    """
    start = text.find('<dtml-comment>')
    end = text.find('</dtml-comment>')
    block = text[start+14:end]
    parameters = {}
    for line in block.split('\n'):
      pair = line.split(':',1)
      if len(pair)!=2:
        continue
      parameters[pair[0].strip().lower()]=pair[1].strip()
    # check for required and optional parameters
    max_rows = parameters.get('max_rows',1000)
    max_cache = parameters.get('max_cache',100)
    cache_time = parameters.get('cache_time',0)
    class_name = parameters.get('class_name','')
    class_file = parameters.get('class_file','')
    title = parameters.get('title','')
    connection_id = parameters.get('connection_id','')
    arguments = parameters.get('arguments','')
    start = text.rfind('<params>')
    end = text.rfind('</params>')
    arguments = text[start+8:end]
    template = text[end+9:]
    while template.find('\n')==0:
      template=template.replace('\n','',1)
    self.manage_edit(title=title, connection_id=connection_id,
                    arguments=arguments, template=template)
    self.manage_advanced(max_rows, max_cache, cache_time, class_name, class_file)
function_tokens: def DA_fromText ( self , text ) : start = text . find ( '<dtml-comment>' ) end = text . find ( '</dtml-comment>' ) block = text [ start + 14 : end ] parameters = { } for line in block . split ( '\n' ) : pair = line . split ( ':' , 1 ) if len ( pair ) != 2 : continue parameters [ pair [ 0 ] . strip ( ) . lower ( ) ] = pair [ 1 ] . strip ( ) # check for required and optional parameters max_rows = parameters . get ( 'max_rows' , 1000 ) max_cache = parameters . get ( 'max_cache' , 100 ) cache_time = parameters . get ( 'cache_time' , 0 ) class_name = parameters . get ( 'class_name' , '' ) class_file = parameters . get ( 'class_file' , '' ) title = parameters . get ( 'title' , '' ) connection_id = parameters . get ( 'connection_id' , '' ) arguments = parameters . get ( 'arguments' , '' ) start = text . rfind ( '<params>' ) end = text . rfind ( '</params>' ) arguments = text [ start + 8 : end ] template = text [ end + 9 : ] while template . find ( '\n' ) == 0 : template = template . replace ( '\n' , '' , 1 ) self . manage_edit ( title = title , connection_id = connection_id , arguments = arguments , template = template ) self . manage_advanced ( max_rows , max_cache , cache_time , class_name , class_file )