[Kent wrote]
> > OK, none of my suggestions gets you closer to this...the simplest way is
> > if you can read the whole file into memory. Then you can just replace
> > the strings in place and write it out again. For example:
> >
> > oldPolicies = '''<<
> > /Policies <<
> >/PageSize 3
> > >>
>> I have a PostScript file which contains the following lines (the numbers
>> are for reference only and are *not* in the file):
>>
>> 1 <<
>> 2 /Policies <<
>> 3 /PageSize 3
>> 4 >>
>> 5 >> setpagedevice
>>
>> I want to open the the file and read it, find these five lines and then
>> re
Bill Burns wrote:
> I have a PostScript file which contains the following lines (the numbers
> are for reference only and are *not* in the file):
>
> 1 <<
> 2 /Policies <<
> 3 /PageSize 3
> 4 >>
> 5 >> setpagedevice
>
> I want to open the the file and read it, find these five lines and t
I have a PostScript file which contains the following lines (the numbers
are for reference only and are *not* in the file):
1 <<
2 /Policies <<
3 /PageSize 3
4 >>
5 >> setpagedevice
These lines never change and are always formatted like this (at least in
the PostScript files that I'm gene