Update

Keep in mind that not all files are readable, you need to guard against this case:

def __iter__(self):
for fname in os.listdir(self.dirname):
try:
for line in open(os.path.join(self.dirname,fname)):
yield line.split()
except IOError:
pass # or handle this error, most likely due to file not readable