Commit 25408915 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Get rid of cPickle module since it has been removed in python3

parent d839faf9
......@@ -20,7 +20,7 @@
from __future__ import division, absolute_import, print_function
import cPickle
import pickle
import base64
import atexit
from io import BytesIO
......@@ -62,13 +62,13 @@ libgraph_tool_core.OStream.write = OStream_write
# define and set the pickler/unpickler functions
def pickler(stream, obj):
sstream = BytesIO()
cPickle.dump(obj, sstream, -1)
pickle.dump(obj, sstream, -1)
def unpickler(stream):
sstream = BytesIO(base64.b64decode(
return cPickle.load(sstream)
return pickle.load(sstream)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment