Re: file corruption on windows - possible bug

2005-05-09 Thread Bengt Richter
On Mon, 09 May 2005 10:54:22 -0400, Jeremy Jones <[EMAIL PROTECTED]> wrote: >I've written a piece of code that iterates through a list of items and >determines the filename to write some piece of data to based on >something in the item itself. Here is a small example piece of code to >show the ty

Re: file corruption on windows - possible bug

2005-05-09 Thread Jeremy Jones
Fredrik Lundh wrote: Jeremy Jones wrote: # file_dict = {} a_list = [("a", "a%s" % i) for i in range(2500)] b_list = [("b", "b%s" % i) for i in range(2500)] c_list = [("c", "c%s" % i) for i in range(2500)] d_list = [("d", "d%s" % i) for i in range(2

Re: file corruption on windows - possible bug

2005-05-09 Thread Duncan Booth
Fredrik Lundh wrote: > you do realize that this opens the file again every time, so you end > up having 4x2500 file handles pointing to 4 physical files. that's a > bad idea. > Assuming he is using the common C Python most of those file handles get closed immediately after opening, so he never

Re: file corruption on windows - possible bug

2005-05-09 Thread Duncan Booth
Jeremy Jones wrote: > Here is a small example piece of code to > show the type of thing I'm doing:: > > # > file_dict = {} > > a_list = [("a", "a%s" % i) for i in range(2500)] > b_list = [("b", "b%s" % i) for i in range(2500)] > c_list = [("c", "c%s" % i) for i in

Re: file corruption on windows - possible bug

2005-05-09 Thread Fredrik Lundh
Jeremy Jones wrote: > # > file_dict = {} > > a_list = [("a", "a%s" % i) for i in range(2500)] > b_list = [("b", "b%s" % i) for i in range(2500)] > c_list = [("c", "c%s" % i) for i in range(2500)] > d_list = [("d", "d%s" % i) for i in range(2500)] > > > joined_list =

file corruption on windows - possible bug

2005-05-09 Thread Jeremy Jones
I've written a piece of code that iterates through a list of items and determines the filename to write some piece of data to based on something in the item itself. Here is a small example piece of code to show the type of thing I'm doing:: # file_dict = {} a_list