Re: File IO Issues, help :(

2008-04-30 Thread Peter Otten
Dennis Lee Bieber wrote: > On Tue, 29 Apr 2008 08:35:46 +0200, Peter Otten <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > >> jsfile.truncate(0) >> jsfile.seek(0) >> > I'd suggest first doing the seek to start, then do the truncate I usually overwrite the file, and that s

Re: File IO Issues, help :(

2008-04-29 Thread Tim Roberts
Kevin K <[EMAIL PROTECTED]> wrote: >On Apr 29, 12:38 am, "Eric Wertman" <[EMAIL PROTECTED]> wrote: >> chuck in a jsfile.close(). The buffer isn't flushing with what you >> are doing now. jsfile.flush() might work... not sure. Closing and >> re-opening the file for sure will help though. >> > >Y

Re: File IO Issues, help :(

2008-04-29 Thread Kevin K
On Apr 29, 1:07 am, Kevin K <[EMAIL PROTECTED]> wrote: > On Apr 29, 12:55 am, Peter Otten <[EMAIL PROTECTED]> wrote: > > > > > Kevin K wrote: > > > On Apr 29, 12:38 am, "Eric Wertman" <[EMAIL PROTECTED]> wrote: > > >> chuck in a jsfile.close(). The buffer isn't flushing with what you > > >> are do

Re: File IO Issues, help :(

2008-04-28 Thread Peter Otten
Kevin K wrote: > On Apr 29, 12:55 am, Peter Otten <[EMAIL PROTECTED]> wrote: >> Kevin K wrote: >> > On Apr 29, 12:38 am, "Eric Wertman" <[EMAIL PROTECTED]> wrote: >> >> chuck in a jsfile.close(). The buffer isn't flushing with what you >> >> are doing now. jsfile.flush() might work... not sure.

Re: File IO Issues, help :(

2008-04-28 Thread Kevin K
On Apr 29, 12:55 am, Peter Otten <[EMAIL PROTECTED]> wrote: > Kevin K wrote: > > On Apr 29, 12:38 am, "Eric Wertman" <[EMAIL PROTECTED]> wrote: > >> chuck in a jsfile.close(). The buffer isn't flushing with what you > >> are doing now. jsfile.flush() might work... not sure. Closing and > >> re-o

Re: File IO Issues, help :(

2008-04-28 Thread Peter Otten
Kevin K wrote: > On Apr 29, 12:38 am, "Eric Wertman" <[EMAIL PROTECTED]> wrote: >> chuck in a jsfile.close(). The buffer isn't flushing with what you >> are doing now. jsfile.flush() might work... not sure. Closing and >> re-opening the file for sure will help though. >> > > Yeah sorry I forgo

Re: File IO Issues, help :(

2008-04-28 Thread Kevin K
On Apr 29, 12:38 am, "Eric Wertman" <[EMAIL PROTECTED]> wrote: > chuck in a jsfile.close(). The buffer isn't flushing with what you > are doing now. jsfile.flush() might work... not sure. Closing and > re-opening the file for sure will help though. > Yeah sorry I forgot to include the close() i

Re: File IO Issues, help :(

2008-04-28 Thread Eric Wertman
chuck in a jsfile.close(). The buffer isn't flushing with what you are doing now. jsfile.flush() might work... not sure. Closing and re-opening the file for sure will help though. On Tue, Apr 29, 2008 at 1:26 AM, Kevin K <[EMAIL PROTECTED]> wrote: > Hey everyone, I'm new to python and am trying

File IO Issues, help :(

2008-04-28 Thread Kevin K
Hey everyone, I'm new to python and am trying to do a little project with it. I'm running into problems writing over a file. I read from the file and loop through for a specfic case in which I change something. After I open and give it opening options (w, r, etc) one of two things happens: either t