Created
September 23, 2011 22:43
-
-
Save lukemarsden/1238656 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f = file(..) | |
nextChunk = True | |
def work(): | |
while nextChunk is not None: | |
nextChunk = f.read(1024) | |
for thing in things: | |
thing.protocol.write(nextChunk) | |
yield | |
task = cooperate(work()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment