parameters: (self, tablews)
return_statement: return (parnamedict, colnamedict, parameterdict)
docstring: Get information from table workspace
  
          Return:  dictionary, key = row number, value = name
docstring_summary: Get information from table workspace
docstring_tokens: Get information from table workspace
function: def parseTableWorkspace(self, tablews):
          """ Get information from table workspace
  
          Return:  dictionary, key = row number, value = name
          """
          parameterdict = {}
  
          # 1. Column name information
          colnames = tablews.getColumnNames()
          self.tableColNames = colnames
          colnamedict = {}
          for ic in range( len(colnames) ):
              colnamedict[colnames[ic]] = ic
  
          # 2. Check validity of workspace
          if len(colnames) < 2:
              raise NotImplementedError("Input table workspace is not supported due to column size.")
          if colnames[0] != "Name" or colnames[1] != "Value":
              raise NotImplementedError("Input table workspace is not supported due to column name.")
  
          # 3. Parse!
          parnamedict = {}
          self.parameternames = []
  
          numrows = tablews.rowCount()
          for irow in range(numrows):
              parname = tablews.cell(irow, 0)
              parname = parname.lower().strip()
              parnamedict[parname] = irow
              self.parameternames.append(parname)
  
              # NEW! Collect each variable in
              valuelist = []
              for icol in range(len(colnames)):
                  value = tablews.cell(irow, icol)
                  valuelist.append(value)
                  parameterdict[parname] = valuelist
              # ENDFOR
  
          # ENDFOR
  
          return (parnamedict, colnamedict, parameterdict)
function_tokens: def parseTableWorkspace ( self , tablews ) : parameterdict = { } # 1. Column name information colnames = tablews . getColumnNames ( ) self . tableColNames = colnames colnamedict = { } for ic in range ( len ( colnames ) ) : colnamedict [ colnames [ ic ] ] = ic # 2. Check validity of workspace if len ( colnames ) < 2 : raise NotImplementedError ( "Input table workspace is not supported due to column size." ) if colnames [ 0 ] != "Name" or colnames [ 1 ] != "Value" : raise NotImplementedError ( "Input table workspace is not supported due to column name." ) # 3. Parse! parnamedict = { } self . parameternames = [ ] numrows = tablews . rowCount ( ) for irow in range ( numrows ) : parname = tablews . cell ( irow , 0 ) parname = parname . lower ( ) . strip ( ) parnamedict [ parname ] = irow self . parameternames . append ( parname ) # NEW! Collect each variable in valuelist = [ ] for icol in range ( len ( colnames ) ) : value = tablews . cell ( irow , icol ) valuelist . append ( value ) parameterdict [ parname ] = valuelist # ENDFOR # ENDFOR return ( parnamedict , colnamedict , parameterdict )