MCPcopy Create free account
hub / github.com/ActiveState/code / write

Function write

recipes/Python/577667_Pickle_tofrom_socket/recipe-577667.py:1–4  ·  view source on GitHub ↗
(_socket, data)

Source from the content-addressed store, hash-verified

1def write(_socket, data):
2 f = _socket.makefile('wb', buffer_size )
3 pickle.dump(data, f, pickle.HIGHEST_PROTOCOL)
4 f.close()
5
6def read(_socket):
7 f = _socket.makefile('rb', buffer_size )

Callers

nothing calls this directly

Calls 3

makefileMethod · 0.45
dumpMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected