parameters: (ltuple)
return_statement: return res
docstring: Construct a list from the tuple returned by ttk::layout, this is
      somewhat the reverse of _format_layoutlist.
docstring_summary: Construct a list from the tuple returned by ttk::layout, this is
      somewhat the reverse of _format_layoutlist.
docstring_tokens: Construct a list from the tuple returned by ttk :: layout this is somewhat the reverse of _format_layoutlist .
function: def _list_from_layouttuple(ltuple):
      """Construct a list from the tuple returned by ttk::layout, this is
      somewhat the reverse of _format_layoutlist."""
      res = []
  
      indx = 0
      while indx < len(ltuple):
          name = ltuple[indx]
          opts = {}
          res.append((name, opts))
          indx += 1
  
          while indx < len(ltuple): # grab name's options
              opt, val = ltuple[indx:indx + 2]
              if not opt.startswith('-'): # found next name
                  break
  
              opt = opt[1:] # remove the '-' from the option
              indx += 2
  
              if opt == 'children':
                  val = _list_from_layouttuple(val)
  
              opts[opt] = val
  
      return res
function_tokens: def _list_from_layouttuple ( ltuple ) : res = [ ] indx = 0 while indx < len ( ltuple ) : name = ltuple [ indx ] opts = { } res . append ( ( name , opts ) ) indx += 1 while indx < len ( ltuple ) : # grab name's options opt , val = ltuple [ indx : indx + 2 ] if not opt . startswith ( '-' ) : # found next name break opt = opt [ 1 : ] # remove the '-' from the option indx += 2 if opt == 'children' : val = _list_from_layouttuple ( val ) opts [ opt ] = val return res