Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
1
def
write(_socket, data):
2
f = _socket.makefile(
'wb'
, buffer_size )
3
pickle.dump(data, f, pickle.HIGHEST_PROTOCOL)
4
f.close()
5
6
def
read(_socket):
7
f = _socket.makefile(
'rb'
, buffer_size )
Callers
nothing calls this directly
Calls
3
makefile
Method · 0.45
dump
Method · 0.45
close
Method · 0.45
Tested by
no test coverage detected