code: def run(self, tool, args, new_import_path=''):
          
          if new_import_path != '':
              #print('APPENDING PATH = ', new_import_path)
              sys.path.append(new_import_path)
          
          #if silent == 'N':
          print('main called ' + tool['file'] + '->' + tool['function'] + ' with ', args, ' = ', tool['return'])
          mod = __import__( os.path.basename(tool['file']).split('.')[0]) # for absolute folder names
          # mod = __import__( tool['file'][:-2]) # for aikif folders (doesnt work)
          func = getattr(mod, tool['function'])
          tool['return'] = func(args)
          return tool['return']
docs: import the tool and call the function, passing the args.