If I've got an iterable containing strings, is there a simple way to turn it into a stream? I want to do something like this:
def make_file():
yield "hello\n"
yield "world\n"
output = tarfile.TarFile(…)
stream = iterable_to_stream(make_file())
output.addfile(…, stream)