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
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
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
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.
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
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
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
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
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