[EMAIL PROTECTED] wrote: > as i understand there are two ways to write data to a file: using > f.write("foo") and print >>f, "foo". well print will add a '\n' or ' ' if you use ',' after it
> what i want to know is which one is faster (if there is any difference there shouldn't be any noticable difference > in speed) since i'm working with very large files. of course, if there > is any other way to write data to a file, i'd love to hear about it other ways: os.system('cat file1 >> file2') or subprocess.Popen or print but sys.stdout = f or ctypes + printf/fputs/.. and probably there are other obscure ways, but the intended way is obviously f.write nsz -- http://mail.python.org/mailman/listinfo/python-list