Re: Insert string into string

2008-07-27 Thread Mensanator
On Jul 27, 1:41�am, Peter Otten <[EMAIL PROTECTED]> wrote: > Mensanator wrote: > > I don't know why you're using stdin if you're reading from a file. > > From Francesco's initial post in his previous thread I inferred that he had > a script like > > f = open("xxx.pdb") > for line in f: > � � # proc

Re: Insert string into string

2008-07-26 Thread Peter Otten
Mensanator wrote: > I don't know why you're using stdin if you're reading from a file. >From Francesco's initial post in his previous thread I inferred that he had a script like f = open("xxx.pdb") for line in f: # process line print line and was calling it python script.py >outfile M

Re: Insert string into string

2008-07-26 Thread Mensanator
On Jul 26, 6:32 pm, Mensanator <[EMAIL PROTECTED]> wrote: > On Jul 26, 4:40�pm, "Francesco Pietra" <[EMAIL PROTECTED]> wrote: > > > > > > > I am posting ex novo as it became confusing to me. I take the > > opportunity to ask advice for a second problem. > > > FIRST PROBLEM > > For file xxx.pdb, ins

Re: Insert string into string

2008-07-26 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "Francesco Pietra" <[EMAIL PROTECTED]> wrote: > I am posting ex novo as it became confusing to me. I take the > opportunity to ask advice for a second problem. > > FIRST PROBLEM > For file xxx.pdb, insert letter "A" into each line that starts with > "ATOM". "A" sh

Re: Insert string into string

2008-07-26 Thread Mensanator
On Jul 26, 4:40�pm, "Francesco Pietra" <[EMAIL PROTECTED]> wrote: > I am posting ex novo as it became confusing to me. I take the > opportunity to ask advice for a second problem. > > FIRST PROBLEM > For file xxx.pdb, insert letter "A" into each line that starts with > "ATOM". "A" should be inserte