from __future__ import print_function from time import sleep from revivalkit import revive o = revive() if not hasattr(o, 'que'): o.que = list(range(10)) print('current que: ', o.que) while o.que: sleep(0.25) print('consumed', o.que.pop())
from revivalkit import revive # will be stored into 02_more_usages.py.coffin # when file doesn't exist, ex_1 = list() ex_1 = revive(list) # will be stored into ex_2.coffin ex_2 = revive(list, 'ex_2') # will be stored into /tmp/ex_3.pickle ex_3 = revive(list, '/tmp/ex_3.pickle')