Re: Line replace
- From: Paul Rubin <http://phr.cx@xxxxxxxxxxxxxx>
- Date: 01 Jan 2006 06:02:23 -0800
DarkBlue <nomail@xxxxxxxxxxx> writes:
> The markers are just there to have a static way to find the line
> after the marker, which is the one which might have to be changed.
OK, why don't you store those changing lines in the database?
Can you arrange for those changeable lines to be fixed length, i.e.
by padding with spaces or something? If you can, then you could just
overwrite them in place. Use flock or fcntl (Un*x) or the comparable
Windows locking primitives to make sure other processes don't update
the file simultaneously.
.
- Follow-Ups:
- Re: Line replace
- From: DarkBlue
- Re: Line replace
- References:
- Line replace
- From: DarkBlue
- Re: Line replace
- From: Steven D'Aprano
- Re: Line replace
- From: DarkBlue
- Re: Line replace
- From: Paul Rubin
- Re: Line replace
- From: DarkBlue
- Line replace
- Prev by Date: Re: Python article in Free Software Magazine
- Next by Date: Re: Line replace
- Previous by thread: Re: Line replace
- Next by thread: Re: Line replace
- Index(es):
Relevant Pages
|
Loading