So I\'m trying to save a kivy widget to a file using cpickle and I get an error.
from kivy.uix.widget import Widget
import cPickle as pickle
foo = Widget()
Looks like using higher protocol may help:
#!/usr/bin/python
# -*- coding: utf-8 -*-
try:
import cPickle as pickle
except:
import pickle
from kivy.uix.widget import Widget
w = Widget()
w.test = 5
data_string = pickle.dumps(w, protocol=pickle.HIGHEST_PROTOCOL)
x = pickle.loads(data_string)
print x.test