This article describes a system very similar to my own. <shameless plug> The LGT library (http://developer.berlios.de/projects/lgt) provides a simple, highly tuned 'microthread' implementation using generators. It is called NanoThreads. It allows a microthread to be paused, resumed, and killed, but not pickled.
The eventnet module facilitates event-driven programming using a global dispatcher. It provides a Handler class which functions in a similar fashion to the Actor described in the article. We used the above recently, to compete in the pyweek game competition (http://mechanicalcat.net/tech/PyWeek/1/) under the moniker TeamXerian. Our boring (but glitzy) game used nanothreads to move, and animate 100 critters at a frame independent rate. Each critter had a thread controlling movement and frame swapping. I also created an XML scene loader, which allowed designers on the team to create a timelined sequence of events, (like a movie script), which controlled sound and image elements using pre-programmed movement, rotation, scaling and fading style actions. If you want to take a peek, you can download a windows exe (17MB) from here: http://metaplay.dyndns.org:82/~xerian/Quido.zip or the source (95k) from here: http://metaplay.dyndns.org:82/~xerian/Quido_src_only.zip </shameless plug> So, forget 'game scripting' in Python, write the whole darn lot in Python! Sw. -- http://mail.python.org/mailman/listinfo/python-list