Re: [Tutor] how to write a line

2005-07-25 Thread Alan G
> but how do i overwrite a line value with another value ? > > i mean, how do go to, say, line 3 of a text file and replace > what is written on line 3 with something else? You can't do it directly easily unless the new version happens to be the exact same length as the original. In practice you

Re: [Tutor] how to write a line

2005-07-25 Thread nephish
i get it. manipulate everything while it is read. make my changes and use writelines(list from readlines earlier) so i kinda just hold everything in the list until i overwrite the original. thats great. my file is only 8 lines long. no problem thanks a lot ! Seems easy now. -shawn On 07/25/2005 04:

Re: [Tutor] how to write a line

2005-07-25 Thread Danny Yoo
On Mon, 25 Jul 2005, nephish wrote: > i know how to read the lines of a txt file. > i know how to write a txt file. > > but how do i overwrite a line value with another value ? > > i mean, how do go to, say, line 3 of a text file and replace what is > written on line 3 with something else? Hi N

[Tutor] how to write a line

2005-07-25 Thread nephish
Hey there, kinda newbie question here. i know how to read the lines of a txt file. i know how to write a txt file. but how do i overwrite a line value with another value ? i mean, how do go to, say, line 3 of a text file and replace what is written on line 3 with something else? thanks <><