How to use the creoleparser.parse_args function in Creoleparser

To help you get started, we’ve selected a few Creoleparser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github circuits / circuits / examples / web / wiki / macros / __init__.py View on Github external
def dispatcher(name, arg_string, body, isblock, environ):
    if name in environ["macros"]:
        macro = Macro(name, arg_string, body, isblock)
        args, kwargs = parse_args(arg_string)
        try:
            return environ["macros"][name](macro, environ, *args, **kwargs)
        except Exception as e:
            return "ERROR: Error while executing macro %r (%s)" % (name, e)
    else:
        return "Macro not found!"