Esempio n. 1
0
def main(args):
    module_list = args.modules.split(',')
    [method_route.call_method_with_special_arg(
        method_route.get_funcation_in_env(globals(), method_name),
        module_list,
        'module_name') 
        for method_name in args.methods.split(',')]
Esempio n. 2
0
def module1(module_name):
    print "module1",module_name
def module2(module_name):
    print "module2",module_name
def module3(module_name):
    print "module3",module_name

def __get_func_info(func):
    # argments count and names
    return [module1.func_code.co_argcount, module1.func_code.co_varnames]


def main(args):
    module_list = args.modules.split(',')
    [method_route.call_method_with_special_arg(
        method_route.get_funcation_in_env(globals(), method_name),
        module_list,
        'module_name') 
        for method_name in args.methods.split(',')]

if __name__ == '__main__':
    print method_route.get_funcation_in_env(globals(),'module1')
    print "sys.argv",sys.argv,len(sys.argv)
    if len(sys.argv)==1:
        sys.argv.append(','.join(EXECUTABLE_METHOD_NAMES))
    parser = gen_parse()
    args = parser.parse_args()
    print "args:",args
    print "methods", args.methods
    print "modules", args.modules
    main(args)