From: Antoine Pelisse Date: Thu, 03 Jan 2013 07:47:56 GMT Subject: Re: [PATCH] Replace git-cvsimport with a rewrite that fixes major bugs. Message-ID: In-Reply-To: <7vmwwqyc8w.fsf@alter.siamese.dyndns.org> > 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? 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)