Re: Strange loop behavior

2008-03-26 Thread Diez B. Roggisch
Gabriel Rossetti schrieb: Hello, I wrote a program that reads data from a file and puts it in a string, the problem is that it loops infinitely and that's not wanted, here is the code : d = repr(f.read(DEFAULT_BUFFER_SIZE)) while d != : file_str.write(d) d =

Re: Strange loop behavior

2008-03-26 Thread Peter Otten
Gabriel Rossetti wrote: I wrote a program that reads data from a file and puts it in a string, the problem is that it loops infinitely and that's not wanted, here is the code : d = repr(f.read(DEFAULT_BUFFER_SIZE)) while d != : file_str.write(d) d =

Re: Strange loop behavior

2008-03-26 Thread Arnaud Delobelle
On Mar 26, 8:35 am, Gabriel Rossetti [EMAIL PROTECTED] wrote: Hello, I wrote a program that reads data from a file and puts it in a string, the problem is that it loops infinitely and that's not wanted, here is the code :     d = repr(f.read(DEFAULT_BUFFER_SIZE))     while d != :        

Re: Strange loop behavior

2008-03-26 Thread Gabriel Rossetti
Gabriel Rossetti wrote: Hello, I wrote a program that reads data from a file and puts it in a string, the problem is that it loops infinitely and that's not wanted, here is the code : d = repr(f.read(DEFAULT_BUFFER_SIZE)) while d != : file_str.write(d) d =

Re: Strange loop behavior

2008-03-26 Thread Arnaud Delobelle
On Mar 26, 8:51 am, Gabriel Rossetti [EMAIL PROTECTED] wrote: Gabriel Rossetti wrote: Hello, I wrote a program that reads data from a file and puts it in a string, the problem is that it loops infinitely and that's not wanted, here is the code :     d =

Re: Strange loop behavior

2008-03-26 Thread Matt Nordhoff
Gabriel Rossetti wrote: Hello, I wrote a program that reads data from a file and puts it in a string, the problem is that it loops infinitely and that's not wanted, here is the code : d = repr(f.read(DEFAULT_BUFFER_SIZE)) while d != : file_str.write(d) d =

Re: Strange loop behavior

2008-03-26 Thread Gabriel Rossetti
Arnaud Delobelle wrote: On Mar 26, 8:35 am, Gabriel Rossetti [EMAIL PROTECTED] wrote: Hello, I wrote a program that reads data from a file and puts it in a string, the problem is that it loops infinitely and that's not wanted, here is the code : d =