rbt wrote: > I've been doing some file system benchmarking. In the process, I need to > create a large file to copy around to various drives. I'm creating the > file like this: > > fd = file('large_file.bin', 'wb') > for x in xrange(409600000): > fd.write('0') > fd.close() > > This takes a few minutes to do. How can I speed up the process? > > Thanks!
Untested, but this should be faster. block = '0' * 409600 fd = file('large_file.bin', 'wb') for x in range(1000): fd.write('0') fd.close() -- http://mail.python.org/mailman/listinfo/python-list