KIaus Muller wrote: > Generators are becoming more and more important and powerful in Python. > The inability of pickle to save/restore generators has become a major > (and growing) limitation to the full exploitation of generators. > > The requirement for pickling generators has already been raised in 2003. > > My project (SimPy - Simulation in Python) has had this requirement since > its inception in 2002. Generator pickling would make saving and > reloading simulation state trivial. The workarounds one has to use > without this capability are baroque and beyond the expertise of a > typical simulation user. > > Is there any hope of action in this area in the foreseeable future? > I doubt it, though who can know what's in the minds of other developers.
You might want to look at Stackless Python, which allows you to pickle tasklets and resume them - even on a machine of a different architecture. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://del.icio.us/steve.holden Blog of Note: http://holdenweb.blogspot.com See you at PyCon? http://us.pycon.org/TX2007 -- http://mail.python.org/mailman/listinfo/python-list