I tried pickling a CookieJar object like this:
import cookielib
import pickle
dumpFile = open('cookie.dump','w')
cj = cookielib.CookieJar()
pickle.dump(cj, dumpFile)
It raised the following exception:
raise TypeError, "can't pickle %s objects" % base.__name__
TypeError: can't pickle lock objects
Can a CookieJar be pickled?