pickling generators

Christian Tismer tismer at tismer.com
Tue Mar 25 01:17:06 CET 2003


Oren Tirosh wrote:
> On Sat, Mar 22, 2003 at 02:56:42PM +0100, Paul Boehm wrote:
> 
>>hi,
>>
>>we're developing a python based adventure game engine for a
>>fangame effort, and we'd like to use generator based lightweight threads,
>>to let each of our objects be scripted mostly independently of each other,
>>without all of the hassles of strictly event oriented coding.
>>
>>our problem, however, is that we can't properly do savegames with this design,
>>as generator instances are not pickle- and unpickleable.
>>
>>we're now looking for options, and advice, on the feasability
>>of getting support for this into future python versions, either by learning
>>how to do it, and implementing it ourselves, or by finding someone willing
>>to help us out.
> 
> 
> Stackless python has picklable execution state somewhere in its roadmap 
> for exactly this kind of application. I'm afraid it won't be available 
> soon enough for your purposes. I know that Christian Tismer is looking 
> for sponsors for his work on Stackless.

I think I can do some support for this. With generators
in their current shape, it would be even possible without Stackless,
although the latter would give you more flexibility. Tasklets are
more flexible than generators, but generators might do what you need.
If you're interested, let's talk about details.

Thanks Oren for your support.

ciao - chris

-- 
Christian Tismer             :^)   <mailto:tismer at tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  pager +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/







More information about the Python-list mailing list