def get_records(fname):
 f = open(fname)
 dtb = f.read()
 f.close()
 recs = dtb.split(u'begin')[1:]
 records = [Record(r) for r in recs]
 return records

def get_records ( fname ) : f = open ( fname ) dtb = f . read ( ) f . close ( ) recs = dtb . split ( u'begin' ) [ 1 : ] records = [ Record ( r ) for r in recs ] return records
read the records of an iraf database file into a python list parameters fname : str name of an iraf database file returns a list of records .