Search code examples
pythongeneratorfibers

Fibers in Python


I'm looking for a very simple way to implement fibers in Python. I'm sure there's a really simple way to do it using generators, but my mind is crapping out on me. This isn't for a huge application, so I don't need the fanciness (or the overhead) of something like Diesel or Tornado or Twisted, I just want a neat little way to do fibers. Any ideas/suggestions?


Solution

  • I've discovered that Greenlets do pretty much exactly what I've been looking to do. Sweet!