def get_string(dump_fn, routines, prefix='file', header=False, empty=False):
 output = StringIO()
 dump_fn(routines, output, prefix, header, empty)
 source = output.getvalue()
 output.close()
 return source

def get_string ( dump_fn , routines , prefix = 'file' , header = False , empty = False ) : output = StringIO ( ) dump_fn ( routines , output , prefix , header , empty ) source = output . getvalue ( ) output . close ( ) return source
read the contents of a specific string index .