File size: 365 Bytes
09397c1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import platform
import subprocess
def subprocess_kwargs():
"""
Returns a dictionary of keyword arguments for subprocess calls, adding platform-specific
flags that we want to use consistently.
"""
kwargs = {}
if platform.system() == "Windows":
kwargs["creationflags"] = subprocess.CREATE_NO_WINDOW # type: ignore
return kwargs
|