MCPcopy Index your code
hub / github.com/python/cpython / Handle

Class Handle

Lib/subprocess.py:221–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219
220
221 class Handle(int):
222 closed = False
223
224 def Close(self, CloseHandle=_winapi.CloseHandle):
225 if not self.closed:
226 self.closed = True
227 CloseHandle(self)
228
229 def Detach(self):
230 if not self.closed:
231 self.closed = True
232 return int(self)
233 raise ValueError("already closed")
234
235 def __repr__(self):
236 return "%s(%d)" % (self.__class__.__name__, int(self))
237
238 __del__ = Close
239else:
240 # When select or poll has indicated that the file is writable,
241 # 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…