I\'ve searched and I can only find questions about the other way around: writing stdin to a file :)
Is there a quick and easy way to dump the contents of a file to s
If it's a large file and you don't want to consume a ton of memory as might happen with Ben's solution, the extra code in
>>> import shutil >>> import sys >>> with open("test.txt", "r") as f: ... shutil.copyfileobj(f, sys.stdout)
also works.