Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

        def parse(text,
          result=None,
          keys=None,
          unparmre=re.compile(
              r'([\000- ]*([^\000- ="]+))'),
          parmre=re.compile(
              r'([\000- ]*([^\000- ="]+)=([^\000- ="]+))'),
          qparmre=re.compile(
              r'([\000- ]*([^\000- ="]+)="([^"]*)")'),
          ):


    if result is None:
        result  = {}
        keys    = []

    __traceback_info__=text

    mo  = parmre.match(text)

    if mo:
        name    = mo.group(2)
        value   = {'default':mo.group(3)}
        l       = len(mo.group(1))

    else:
        mo = qparmre.match(text)

        if mo:
            name    = mo.group(2)
            value   = {'default':mo.group(3)}
            l       = len(mo.group(1))

        else:
            mo = unparmre.match(text)

            if mo:
                name    = mo.group(2)
                value   = {}
                l       = len(mo.group(1))
            else:
                if not text or not text.strip(): return Args(result,keys)
                raise InvalidParameter, text

    lt=name.find(':')
    if lt > 0:
        value['type']=name[lt+1:]
        name=name[:lt]

    result[name]=value
    keys.append(name)

    return parse(text[l:],result,keys)
        


src/p/r/Products.ZSQLMethods-2.13.4/src/Shared/DC/ZRDB/DA.py   Products.ZSQLMethods(Download)
from Aqueduct import custom_default_report
from Aqueduct import default_input_form
from Aqueduct import parse
from RDB import File
from Results import Results
        arguments=str(arguments)
        self.arguments_src=arguments
        self._arg=parse(arguments)
        template=str(template)
        self.src=template
        if m:
            self.arguments_src = m.group(1)
            self._arg=parse(self.arguments_src)
            body = body[m.end():]
        template = body