without the explicit newlines in file.write(i), could it be that the
file was closed before the write buffer was ever flushed?

mike


On Mon, 7 Feb 2005 14:58:03 -0500, Smith, Jeff <[EMAIL PROTECTED]> wrote:
> -----Original Message-----
> From: Alan Gauld [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 07, 2005 2:49 PM
> To: Reed L. O'Brien; tutor@python.org
> Subject: Re: [Tutor] manipulating a file
> 
> >You should add a newline character otherwise you will just
> >get one enormously long line!
> >
> >                dstfile.write(i+'\n')
> 
> In these cases, I've taken to doing
>         print >> dstfile, I
> 
> ...hmmm starting to look like Perl's many ways to accomplish the same
> thing approach :-)
> 
> Jeff
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to