def get_billtext(abbr):
 DATA = join(settings.BILLY_DATA_DIR, abbr, 'billtext')
 for filename in os.listdir(DATA):
  filename = join(DATA, filename)
  with open(filename) as f:
   text = f.read()
  (yield (filename, text))

def get_billtext ( abbr ) : DATA = join ( settings . BILLY_DATA_DIR , abbr , 'billtext' ) for filename in os . listdir ( DATA ) : filename = join ( DATA , filename ) with open ( filename ) as f : text = f . read ( ) ( yield ( filename , text ) )
a generator of billtext for the given state .