MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / Handle

Class Handle

tools/python-3.11.9-amd64/Lib/subprocess.py:215–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213
214
215 class Handle(int):
216 closed = False
217
218 def Close(self, CloseHandle=_winapi.CloseHandle):
219 if not self.closed:
220 self.closed = True
221 CloseHandle(self)
222
223 def Detach(self):
224 if not self.closed:
225 self.closed = True
226 return int(self)
227 raise ValueError("already closed")
228
229 def __repr__(self):
230 return "%s(%d)" % (self.__class__.__name__, int(self))
231
232 __del__ = Close
233else:
234 # When select or poll has indicated that the file is writable,
235 # we can write up to _PIPE_BUF bytes without risk of blocking.

Callers 3

_get_handlesMethod · 0.70
_make_inheritableMethod · 0.70
_execute_childMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected