Andrew Robert <andrew.arobert at gmail.com> writes: > When I run the script, I get an error that the file object does not have > the attribute getblocks. Woops, yes, you have to call getblocks(f). Also, Heiko says you can't use "return" to break out of the generator; I thought you could but maybe I got confused.