Event-driven simulator for Python using greenlets