hide subprocess consoles on Windows (#656)

This commit is contained in:
VampiroMedicado
2024-01-01 18:11:55 -08:00
committed by GitHub
parent 169a41e7d2
commit e8502f008a
4 changed files with 21 additions and 14 deletions
+6
View File
@@ -21,6 +21,7 @@
import os
from hashlib import md5
from html.parser import HTMLParser
import subprocess
from distutils.version import StrictVersion
from re import split
import sys
@@ -135,3 +136,8 @@ def dependencyCheck(level):
if len(missing) > 0:
print('ERROR: ' + ', '.join(missing) + ' is not installed!')
sys.exit(1)
def subprocess_run_silent(command, **kwargs):
if (os.name == 'nt'):
kwargs.setdefault('creationflags', subprocess.CREATE_NO_WINDOW)
return subprocess.run(command, **kwargs)