Search code examples
pythongitgitpython

Disable popup of cmd windows when using gitpython and py2exe?


On using gitpython on Windows with py2exe, every operation that is invoked by gitpython results in a cmd popup window. It seems to be that gitpython is using subprocess internally. Is there a way to specify the following equivalent in gitpython?

creationflags=win32process.CREATE_NO_WINDOW 

Solution

  • Found the solution. The way to solve this is to do this for gitpython is by setting before using the Git() object.

    Git.USE_SHELL=True