En Thu, 16 Jul 2009 17:41:39 -0300, Robert Robert <robertrober...@yahoo.com> escribió:

I am trying to write a binary string to file on a windows network share. I get an IOError. I've read that it is because the file size is too large. I did a type( binaryString) and saw that it was type "str". So I loop through it one by one element and use f.write to write to file, and it worked without any error. However it took a long while to write to file. I was wondering how I could split this binary string into N number of chunks efficiently and write them to file.

some_string[i:i+BLOCK_SIZE]
returns a slice of the original string, starting at position i, with length BLOCK_SIZE.

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to