def multithreader(args, paths):
    """Execute multiple processes at once."""

    def shellprocess(path):
        """Return a ready-to-use subprocess."""
        import subprocess
        return subprocess.Popen(args + [path],
                                stderr=subprocess.DEVNULL,
                                stdout=subprocess.DEVNULL)

    processes = [shellprocess(path) for path in paths]

    for process in processes:
        process.wait()
def multithreader ( args , paths ) : def shellprocess ( path ) : import subprocess return subprocess . Popen ( args + [ path ] , stderr = subprocess . DEVNULL , stdout = subprocess . DEVNULL ) processes = [ shellprocess ( path ) for path in paths ] for process in processes : process . wait ( )
Execute multiple processes at once.