summaryrefslogtreecommitdiffstats
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
authorSubhendu Ghosh <subho.prp@gmail.com>2017-02-25 14:59:05 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2017-02-25 14:59:05 (GMT)
commitae160bba2030a7b6c86f6c7aeaf2f9d3fdb627b7 (patch)
tree82df8ee0582f8a14dba8154fdd18b5383ac21f62 /Lib/subprocess.py
parent21024f06622c4c55b666adb130797a4ee205d005 (diff)
downloadcpython-ae160bba2030a7b6c86f6c7aeaf2f9d3fdb627b7.zip
cpython-ae160bba2030a7b6c86f6c7aeaf2f9d3fdb627b7.tar.gz
cpython-ae160bba2030a7b6c86f6c7aeaf2f9d3fdb627b7.tar.bz2
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.
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r--Lib/subprocess.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index 67b9c9f..dffcda3 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -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