1
0
forked from VimPlug/jedi

Add a way to generalize Popen

This commit is contained in:
Dave Halter
2018-04-13 10:17:30 +02:00
parent 81623c6b5d
commit 83d635cbac
3 changed files with 14 additions and 4 deletions
+9
View File
@@ -10,6 +10,7 @@ import re
import pkgutil
import warnings
import inspect
import subprocess
try:
import importlib
except ImportError:
@@ -500,3 +501,11 @@ except ImportError:
VAR_POSITIONAL = object()
KEYWORD_ONLY = object()
VAR_KEYWORD = object()
class GeneralizedPopen(subprocess.Popen):
def __init__(self, *args, **kwargs):
creation_flags = 0
if os.name == 'nt':
creation_flags = subprocess.CREATE_NO_WINDOW
super(GeneralizedPopen, self).__init__(*args, creation_flags=creation_flags, **kwargs)