import sys with open(sys.argv[1]) as fin: for c in iter((lambda: fin.read(1)), ""): sys.stdout.write(c)