Tim Peters wrote:
> [Frederic Rentsch]
>
>> Thanks a lot for your input. I seemed to notice that everything
>> works fine without setting the cursor as long as it stops before the end
>> of the file. Is that also a coincidence that may not work?
>>
>
> "if you want to read following
[Frederic Rentsch]
> Thanks a lot for your input. I seemed to notice that everything
> works fine without setting the cursor as long as it stops before the end
> of the file. Is that also a coincidence that may not work?
"if you want to read following a write, or write following a read, on
Tim,
Thanks a lot for your input. I seemed to notice that everything
works fine without setting the cursor as long as it stops before the end
of the file. Is that also a coincidence that may not work?
Frederic
Tim Peters wrote:
> [Frederic Rentsch]
>
>>Working with read and write
[Frederic Rentsch]
>Working with read and write operations on a file I stumbled on a
> complication when writes fail following a read to the end.
>
> >>> f = file ('T:/z', 'r+b')
> >>> f.write ('abcdefg')
> >>> f.tell ()
> 30L
> >>> f.seek (0)
> >>> f.read ()
> 'abcdefg'
> >>> f.flush ()
Hi all,
Working with read and write operations on a file I stumbled on a
complication when writes fail following a read to the end.
>>> f = file ('T:/z', 'r+b')
>>> f.write ('abcdefg')
>>> f.tell ()
30L
>>> f.seek (0)
>>> f.read ()
'abcdefg'
>>> f.flush () # Calling or not makes no dif