On Fri, 22 Aug 2008 22:18:37 +0530, Anjanesh Lekshminarayanan wrote: > Im trying to download a file from a server. But how do I detect EOF ?
Whenever read() method returns empty string/list. > while f1: # When to stop ? retval = f1.read() if not retval: break f2.write(retval) should do the job. -- Regards, Wojtek Walczak, http://tosh.pl/gminick/ -- http://mail.python.org/mailman/listinfo/python-list