def fromfile(self, filename): """ It builds a structure from a file. """ fd = open(fname, 'r') data = fd.read() fd.close() return self.feed(data)