# Git config from a Python script

1 messages from 2010-09-07 to 2010-09-07. Participants: Jerome Vuarand.
Thread: https://gitlist.dev/t/25021

## Jerome Vuarand, 2010-09-07 12:45

Subject: Git config from a Python script
Message-ID: <AANLkTinUi-c+Vo36EYjKoH-0Ye-J0ZFtqeMySdmnHf2L@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTinUi-c%2BVo36EYjKoH-0Ye-J0ZFtqeMySdmnHf2L%40mail.gmail.com

```
Hi,

I'm trying to write Git hooks in Python. I'd like to run some git
commands from the hook, so I'm using the Python subprocess module.
When running the "git config" command, I can only get access to local
configuration, while the exact same command from a command line give
me access to both local and global configuration. I already checked
that environment variables from a program run by python are the same
as when run from the command line. So I'm wondering what else could be
the source of that difference.

I'm on Windows XP, using Git 1.6.4.msysgit.0 and Python 2.6.2.

Regards,

Jérôme Vuarand.

```
