Read and analyse the next line of the SExtractor catalog
        and return a dictionary {'param1': value, 'param2': value, ...}.
776529
def readline(self):
        
        if not(self._firstline):
            self._line = self._file.readline()

        self._firstline = False

        if not(self._line):
            return None
        __ll = (self._line).replace('\n', '')
        __values = __ll.split()
        self._outdict.update(dict(zip(self._keys, __values)))
        for i in self._keys:
            self._outdict[i] = (
                SExtractorfile._SE_keys[i]["infunc"](self._outdict[i]))

        return self._outdict.copy()
153733
def _get_two_lines(f):
    
    l0 = f.readline()
    l1 = f.readline()
    return l0, l1
1313780
def to_params(self):
        
        dic = self.__dict__
        return [(k, repr(dic[k])) for k in sorted(dic)
                if not k.startswith('_')]
1249433
def _dict_lookup(cls, item, **kwargs):
        '''
        
        '''
        log.debug('item == %s', item)
        value_lookup = kwargs.get('value_lookup', False)
        if 'lookup' in kwargs:
            for k, v in six.iteritems(kwargs['lookup']):
                if value_lookup:
                    if six.text_type(v).lower() == six.text_type(item).lower():
                        log.debug('returning key %s', k)
                        return k
                else:
                    if six.text_type(k).lower() == six.text_type(item).lower():
                        log.debug('returning value %s', v)
                        return v
        return 'Invalid Value'
1309328
def parse(cls, line, ns={}):
        
        definitions = []
        parses  = [p for p in cls.compositor_spec.scanString(line)]
        if len(parses) != 1:
            raise SyntaxError("Invalid specification syntax.")
        else:
            e = parses[0][2]
            processed = line[:e]
            if (processed.strip() != line.strip()):
                raise SyntaxError("Failed to parse remainder of string: %r" % line[e:])

        opmap = {op.__name__:op for op in Compositor.operations}
        for group in cls.compositor_spec.parseString(line):

            if ('mode' not in group) or group['mode'] not in ['data', 'display']:
                raise SyntaxError("Either data or display mode must be specified.")
            mode = group['mode']

            kwargs = {}
            operation = opmap[group['op']]
            spec = ' '.join(group['spec'].asList()[0])

            if  group['op'] not in opmap:
                raise SyntaxError("Operation %s not available for use with compositors."
                                  % group['op'])
            if  'op_settings' in group:
                kwargs = cls.todict(group['op_settings'][0], 'brackets', ns=ns)

            definition = Compositor(str(spec), operation, str(group['value']), mode, **kwargs)
            definitions.append(definition)
        return definitions
781584
def read(cls, string):
        
        fmatter = ""
        body = ""
        result = cls._regex.search(string)

        if result:
            fmatter = result.group(1)
            body = result.group(2)
        return {
            "attributes": yaml.load(fmatter),
            "body": body,
            "frontmatter": fmatter,
        }
859661
def _postfix_varlist(self, line):
        
        els = line.split()
        result = {}
        if len(els) >= 2:
            defvars = [v for v in els if "=" in v]
            varlist = []
            for dvar in defvars:
                gvar, lvar = dvar.split("=")
                if lvar != "":
                    result[lvar] = gvar
        return result
898247
def _parse(self, params):
        '''  
        '''
        if not isinstance(params, dict):
            return None, None

        if len(params) == 0:
            return None, None

        selectors = list()
        modifiers = list()
        
        for k in params.keys():

            if k in LOGICAL_OPERATORS:
                selectors.append(self._logical(k, params[k]))

            elif k in QUERY_MODIFIERS:
                modifiers.append(self._modifier(k, params[k]))

            else:
                if k == '_id':
                    selectors.append("rowid%s" % (self._value_wrapper(params[k])))
                else:
                    selectors.append("%s%s" % (k, self._value_wrapper(params[k])))

        _selectors = ' AND '.join(selectors).strip()
        _modifiers = ' '.join(modifiers).strip()
        return _selectors, _modifiers
776703
function parseParameter(spec, ctx, params) {
  if (!spec || !isObject(spec)) return spec;

  for (var i=0, n=PARSERS.length, p; i<n; ++i) {
    p = PARSERS[i];
    if (spec.hasOwnProperty(p.key)) {
      return p.parse(spec, ctx, params);
    }
  }
  return spec;
}
305068
def _parse_metadatas(self, text_lines):
        
        if not text_lines:
            return {}
        expr_metadata = re.compile(r'^#\+([a-zA-Z]+):(.*)')
        return {
            expr_metadata.match(line).group(1).lower()
            : expr_metadata.match(line).group(2).strip()
            for line in text_lines
        }
51851
def _parse_dict(cls, value):
        
        separator = '='
        result = {}
        for line in cls._parse_list(value):
            key, sep, val = line.partition(separator)
            if sep != separator:
                raise DistutilsOptionError(
                    'Unable to parse option value to dict: %s' % value)
            result[key.strip()] = val.strip()

        return result
111647
def extract_opts(**opts):
    
    values = {}
    for opt, init in opts.items():
        try:
            idx = sys.argv.index('-%s' % opt)
        except ValueError:
            continue
        if idx+1 < len(sys.argv):
            opts[opt] = sys.argv.pop(idx+1)

        sys.argv.pop(idx)

    return opts
623295
def _readlines(fname, fpointer1=open, fpointer2=open):  # pragma: no cover
    """"""
    # fpointer1, fpointer2 arguments to ease testing
    try:
        with fpointer1(fname, "r") as fobj:
            return fobj.readlines()
    except UnicodeDecodeError:  # pragma: no cover
        with fpointer2(fname, "r", encoding="utf-8") as fobj:
            return fobj.readlines()
357507
def read_text(self):  # type: () ->Dict[str,str]
        
        found = {}
        for file in self.file_inventory.text_files:
            if not os.path.isfile(file):
                continue
            with self.file_opener.open_this(file, "r") as infile:
                text = infile.readline()
            found[file] = text.strip(" \n")
        return found
82757
def parse_parametrs(p):
    
    ret = {}
    while len(p) > 1 and p.count('|') > 0:
        s = p.split('|')
        l = int(s[0])  # length of param field
        if l > 0:
            p = p[len(s[0]) + 1:]
            field_name = p.split('|')[0].split('=')[0]
            field_value = p[len(field_name) + 1:l]
            p = p[l + 1:]
            ret[field_name] = field_value
    return ret
1021343
def params(self):
        """"""

        result = {}

        for content in list(self.values()):

            if isinstance(content, CompositeModelElement):
                cparams = content.params

                for cpname in cparams:
                    cparam = cparams[cpname]

                    if cpname in result:
                        result[cpname].update(cparam)

                    else:
                        result[cpname] = cparam.copy()

            elif content.name in result:
                result[content.name].update(content)

            else:
                result[content.name] = content.copy()

        return result
708880
def _parse_keyvals(self, line_iter):
        
        out = None
        line = None
        for line in line_iter:
            if len(line) == 1 and line[0].upper() == line[0]:
                break
            else:
                # setup output dictionaries, trimming off blank columns
                if out is None:
                    while not line[-1]:
                        line = line[:-1]
                    out = [{} for _ in line[1:]]
                # add blank values if the line is stripped
                while len(line) < len(out) + 1:
                    line.append("")
                for i in range(len(out)):
                    out[i][line[0]] = line[i+1].strip()
                line = None
        return out, line