Avoid spawning console windows when running from .pyw by boppreh · Pull Request #126 · gitpython-developers/GitPython
Repository navigation
Avoid spawning console windows when running from .pyw - #126
Merged
Byron merged 1 commit into gitpython-developers:0.3 from boppreh:patch-1 Nov 17, 2014
Merged
Avoid spawning console windows when running from .pyw #126 Byron merged 1 commit into gitpython-developers:0.3 from boppreh:patch-1
Conversation
boppreh commented Oct 18, 2013
Copy link Copy Markdown
Contributor
I'm developing a small background application (Windows + PyQt) to track Git repositories.
The GitPython module works great, but when called from a windowless script (.pyw) each command spawns a console window. Those windows are empty and last only a second, but I think they should not be there at all.
I saw it was using Popen to call the git executable and added a shell=True parameter to avoid spawning those windows.
Be aware I haven't tested this on other machines or operating systems.
Avoid spawning console windows when running from .pyw
3f277ba
By adding `shell=True,` to the list of Popen parameters, we avoid spawning console windows when scripts call this method from a windowless (.pyw) Python script.Byron merged commit
3f277ba
into
gitpython-developers : 0.3
Nov 17, 2014
Byron commented Nov 17, 2014
Copy link Copy Markdown
Member
|
I didn't test it on windows either, but made sure a shell is only enforced on windows now. |
fix(cmd): throw GitCommandNotFoundError ...
1c2dd54
... if it is not found. Previously, especially on windows, this wasn't explicit. Fixes #248, affects #126
Byron commented Apr 8, 2015
Copy link Copy Markdown
Member
|
Please note that with the release of v0.3.7 , you will need to to set |
USE_SHELL = True not needed since 2.0.8 but still suggested for Windows
#1781
Closed
EliahKagan
mentioned this pull request
Jan 16, 2024
Fix two remaining Windows untrusted search path cases
#1792
Merged
Sign up for free
to join this conversation on GitHub .
Already have an account?
Sign in to comment