使用 gitpython 和 py2exe 时禁用 cmd windows 的弹出窗口?

Disable popup of cmd windows when using gitpython and py2exe?

在 Windows 上使用带有 py2exe 的 gitpython 时,gitpython 调用的每个操作都会导致 cmd 弹出 window。似乎是 gitpython 在内部使用子进程。有没有办法在 gitpython 中指定以下等效项?

creationflags=win32process.CREATE_NO_WINDOW 

找到解决方案。解决这个问题的方法是在使用 Git() 对象之前对 gitpython 进行设置。

Git.USE_SHELL=True