Implement Python Generators

This rather large patch which implement python generators.

leftover from earlier?