Implement Python Generators

This rather large patch which implement python generators.