class DB(database.ContentsDatabase,image.Datatype): ld=None def __init__(self,maximg=100,dev=None): self.maximg=maximg self.cr=CameraReader(dev) def __iter__(self): class O: def __init__(self): self.o=None def f(self,x): self.o=x o=O() self.cr.set_observer(o) while True: cr.cr.step() yield (o.o,None)