'Run a Dulwich command.
:param name: Name of the command, as it exists in bin/
:param args: Arguments to the command'

def run_command(self, name, args):

    env = dict(os.environ)
    env['PYTHONPATH'] = os.pathsep.join(sys.path)
    argv = ([sys.executable, self.bin_path(name)] + args)
    return subprocess.Popen(argv, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE, env=env)
