def run_macro(line):
    """
    Run a macro
    Usage: run_macro <macro name or macro short name>
    """
    global macro_dict
    global loaded_macros
    args = shlex.split(line)
    if not args:
        raise PappyException('You must give a macro to run. You can give its short name, or the name in the filename.')
    mname = args[0]
    if mname not in macro_dict:
        raise PappyException('%s not a loaded macro' % mname)
    macro = macro_dict[mname]
    macro.execute(args[1:])
dataset/ETHPy150Open roglew/pappy-proxy/pappyproxy/plugins/macrocmds.py/run_macro/original