def main(args, cmds=_Cmds, OKd=_OKd, out=_Out, debug=_Debug,
               recursive=_Recursive, x3=_X3):
    '''Get a postprocessor, run the commands on the
       given arguments, split the output and return
       the number of non-OK'd warnings.
    '''
    m = n = 0
    p = Processor(cmds, OKd, debug, out=out, x3=x3)
    while args:
        arg = args.pop(0)
        if os.path.isdir(arg):
            for d, ds, fs in os.walk(arg):
                for f in fs:
                    if _Xpy and f.endswith(_Xpy):
                        pass  # exclude
                    elif f.endswith('.py'):
                        f  = os.path.join(d, f)
                        n += p.warnings(f)
                        m += 1
                if recursive:
                    args.extend(ds)
        else:
            n += p.warnings(arg)
            m += 1
    if m != 1:
        p.printf('%s%s total in %s', _NL, plural(n, 'error'), plural(m, 'module'))
    return n  # number of non-OK'd warnings
Get a postprocessor, run the commands on the
       given arguments, split the output and return
       the number of non-OK'd warnings.
    
recipes/Python/546532_PyChecker_postprocessor/recipe-546532.py