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

Method putmessage

Lib/idlelib/rpc.py:332–346  ·  view source on GitHub ↗
(self, message)

Source from the content-addressed store, hash-verified

330 return seq
331
332 def putmessage(self, message):
333 self.debug("putmessage:%d:" % message[0])
334 try:
335 s = dumps(message)
336 except pickle.PicklingError:
337 print("Cannot pickle:", repr(message), file=sys.__stderr__)
338 raise
339 s = struct.pack("<i", len(s)) + s
340 while len(s) > 0:
341 try:
342 r, w, x = select.select([], [self.sock], [])
343 n = self.sock.send(s[:BUFSIZE])
344 except (AttributeError, TypeError):
345 raise OSError("socket no longer exists")
346 s = s[n:]
347
348 buff = b''
349 bufneed = 4

Callers 3

asynccallMethod · 0.95
asyncqueueMethod · 0.95
pollresponseMethod · 0.95

Calls 5

debugMethod · 0.95
dumpsFunction · 0.70
packMethod · 0.45
selectMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected