def cmdresult(args):
    cmdid = subprocess.Popen(args, stdin = open(os.devnull, 'r'),
                             stdout = subprocess.PIPE,
                             stderr = subprocess.STDOUT)
    result, err = cmdid.communicate() # err will always be None
    status = cmdid.wait()
    return (status, result)
Enumerate the partitions of a multiset.
dataset/ETHPy150Open coreemu/core/daemon/core/misc/utils.py/cmdresult--crossover with--dataset/ETHPy150Open sympy/sympy/sympy/utilities/enumerative.py/MultisetPartitionTraverser.enum_all