bpo-26128: Added __init__to subprocess.STARTUPINFO (#171)

The Windows-specific subprocess.STARTUPINFO class now accepts
keyword-only arguments to its constructor to set the various
data attributes.

Patch by Subhendu Ghosh.
This commit is contained in:
Subhendu Ghosh 2017-02-25 20:29:05 +05:30 committed by Nick Coghlan
parent 21024f0662
commit ae160bba20
5 changed files with 32 additions and 7 deletions

View file

@ -127,11 +127,13 @@ if _mswindows:
import msvcrt
import _winapi
class STARTUPINFO:
dwFlags = 0
hStdInput = None
hStdOutput = None
hStdError = None
wShowWindow = 0
def __init__(self, *, dwFlags=0, hStdInput=None, hStdOutput=None,
hStdError=None, wShowWindow=0):
self.dwFlags = dwFlags
self.hStdInput = hStdInput
self.hStdOutput = hStdOutput
self.hStdError = hStdError
self.wShowWindow = wShowWindow
else:
import _posixsubprocess
import select