def write(_socket, data): f = _socket.makefile('wb', buffer_size ) pickle.dump(data, f, pickle.HIGHEST_PROTOCOL) f.close() def read(_socket): f = _socket.makefile('rb', buffer_size ) data = pickle.load(f) f.close() return data
Diff to Previous Revision
--- revision 1 2011-04-19 22:22:02 +++ revision 2 2011-04-19 22:22:53 @@ -7,3 +7,4 @@ f = _socket.makefile('rb', buffer_size ) data = pickle.load(f) f.close() + return data