Antoine Pelisse <apelisse@xxxxxxxxx> writes: >> Doesn't Python come with a standard subprocess module that lets you >> spawn external programs safely, similar to the way Perl's list form >> open(), e.g. "open($fh, "-|", 'git', @args)", works? ... and of course a more boring "system('git', $subcmd, @args)", as well. > You mean something like this: > > p1 = subprocess.Popen([backend.command()], stdout=subprocess.PIPE) > subprocess.Popen(["git", "fast-import", "--quiet"] + gitopts, > cwd=outdir, stdin=p1.stdout) > > Assuming gitopts is a list rather than a string. (care must be taken > with backend.command() also) Yes. I vaguely recall that the subprocess module once used to be one portability issue but that was between Python 2.3 and 2.4 or some ancient history, and it should no longer be relevant. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html