Is there a way to serialize a generator, current state and all (local variables, etc), so that you can load the string containing the serialized generator later and be able to pick up right from where the last yield statement exited the function? If yes and you know of a web page with a code sample, please share a link to it.
Share
You should check out
generator_tools‘picklegenerator.You might also find this article useful: http://metaoptimize.com/blog/2009/12/22/why-cant-you-pickle-generators-in-python-workaround-pattern-for-saving-training-state/