mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
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:
parent
21024f0662
commit
ae160bba20
5 changed files with 32 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue