python 2.x use send instead of send_data for generator.