Alan Gauld schreef:
> To see some examples in MALLARD Basic (one of the ones that
> I have used in the past - on CP/M!) look here:
>
> http://www.fvempel.nl/basic.html
>
> (Its got German(or Dutch mebbe given the .nl?) variables and comments
> but the keywords are in English!)
Yep, it's Dutch.
>> Some languages, such as COBOL and some BASICs etc support
>> random access files, unfortunately Python doesn't
> You then go on to mention file.seek(). I thought that seek() provided
> "random access", ie. to seek to anywhere at random in a file. Can you
> clarify what you mean by "random acce
On Wed, 8 Mar 2006, andrew clarke wrote:
> On Tue, Mar 07, 2006 at 11:18:27AM -, Alan Gauld wrote:
>
> > > I was wondering if it is possible to write a string to a specific line
> > > in a file without reading in the whole file in as the below.
> >
> > Some languages, such as COBOL and some
On Tue, Mar 07, 2006 at 11:18:27AM -, Alan Gauld wrote:
> > I was wondering if it is possible to write a string to a specific line
> > in a file without reading in the whole file in as the below.
>
> Some languages, such as COBOL and some BASICs etc support
> random access files, unfortunate
> I was wondering if it is possible to write a string to a specific line
> in a file without reading in the whole file in as the below.
Some languages, such as COBOL and some BASICs etc support
random access files, unfortunately Python doesn't (Although I'll be
amazed if somebody hasn't cooked u
Sorry, I meant lines in line in the below:
f = open(filename)
lines = f.readlines()
f.close()
# num for some line number
>>lines[num] = "String"
f = open(filename)
f.writelines(lines)
f.close()
***
Hello,
I was wondering if it is
Hello,
I was wondering if it is possible to write a string to a specific line
in a file
without reading in the whole file in as the below.
___
f = open(filename)
lines = f.readlines()
f.close()
# num for some line number
line[num] =