Re: [Tutor] endless processing through for loop

2008-06-23 Thread bob gailer
Dinesh B Vadhia wrote: I have a program with 2 for loops like this (in pseudocode): fw = open(newLine.txt, 'w') for i in xrange(0, 700,000, 1): read a file fname from folder for line in open(fname, 'r'): do some simple string processing on line fw.write(newline) fw.clos

Re: [Tutor] endless processing through for loop

2008-06-22 Thread John Fouhy
On 23/06/2008, Dinesh B Vadhia <[EMAIL PROTECTED]> wrote: > I have a program with 2 for loops like this (in pseudocode): > > fw = open(newLine.txt, 'w') > for i in xrange(0, 700,000, 1): > read a file fname from folder > for line in open(fname, 'r'): > do some simple string processi

Re: [Tutor] endless processing through for loop

2008-06-22 Thread Dinesh B Vadhia
c: tutor@python.org Subject: Re: [Tutor] endless processing through for loop On Sun, Jun 22, 2008 at 8:13 PM, Dinesh B Vadhia <[EMAIL PROTECTED]> wrote: > That's it. Very simple but after i reaches about 550,000 the program begins > to crawl. As an example, the loops to 550,000 t

Re: [Tutor] endless processing through for loop

2008-06-22 Thread Kent Johnson
On Sun, Jun 22, 2008 at 8:13 PM, Dinesh B Vadhia <[EMAIL PROTECTED]> wrote: > That's it. Very simple but after i reaches about 550,000 the program begins > to crawl. As an example, the loops to 550,000 takes about an hour. From > 550,000 to 580,000 takes an additional 4 hours. > > Any ideas abou

Re: [Tutor] endless processing through for loop

2008-06-22 Thread Alan Gauld
"Dinesh B Vadhia" <[EMAIL PROTECTED]> wrote fw = open(newLine.txt, 'w') for i in xrange(0, 700,000, 1): read a file fname from folder for line in open(fname, 'r'): do some simple string processing on line fw.write(newline) fw.close() From 550,000 to 580,000 takes an addi

[Tutor] endless processing through for loop

2008-06-22 Thread Dinesh B Vadhia
I have a program with 2 for loops like this (in pseudocode): fw = open(newLine.txt, 'w') for i in xrange(0, 700,000, 1): read a file fname from folder for line in open(fname, 'r'): do some simple string processing on line fw.write(newline) fw.close() That's it. Very simpl