def run_int_macro(line):
    global int_macro_dict
    global loaded_int_macros
    args = shlex.split(line)
    if len(args) == 0:
        raise PappyException('You must give an intercepting macro to run. You can give its short name, or the name in the filename.')
    if args[0] not in int_macro_dict:
        raise PappyException('%s not a loaded intercepting macro' % line)
    macro = int_macro_dict[args[0]]
    try:
        macro.init(args[1:])
        add_intercepting_macro(macro.name, macro)
        print '"%s" started' % macro.name
    except Exception as e:
        print 'Error initializing macro:'
        raise e
Activate an intercepting macro
dataset/ETHPy150Open roglew/pappy-proxy/pappyproxy/plugins/macrocmds.py/run_int_macro