@crochet.wait_for(timeout=None)
@defer.inlineCallbacks
def generate_template_macro(line):
    if line == '':
        print 'Usage: gtma <fname> <template> [args]'
        print 'Macro templates:'

        templates = MacroTemplate.template_list()
        templates.sort()
        for t in templates:
            if MacroTemplate.template_argstring(t):
                print '"%s %s" - %s' % (t, MacroTemplate.template_argstring(t), MacroTemplate.template_description(t))
            else:
                print '"%s" - %s' % (t, MacroTemplate.template_description(t))
    else:
        yield gen_macro_helper(line)
Generate a macro from a built in template
dataset/ETHPy150Open roglew/pappy-proxy/pappyproxy/plugins/macrocmds.py/generate_template_macro