newbie Q: delete list few lines in file
Peter Hansen
peter at engcorp.com
Mon Jul 1 00:23:36 EDT 2002
Jonathan Hogg wrote:
>
> I think that it is unclear from Xah's original post whether the files or the
> lines are to be deleted. Certainly, asking how to write to files in place
> suggests that the lines are to be deleted.
I didn't catch that part. Apparently neither did anyone else who was
interested in helping, rather than criticizing...
I just ask things that come to mind to try to clarify the vague
questions we get. If I slip up sometimes in my reply, well, that's
to be expected. At least I'm trying to ferret out a useful answer.
> > -trying-not-to-complicate-things-ly yr's,
>
> If you want to say "that's complicated, are you sure you want to do that?",
> go ahead. But it's not helpful to tell someone that something cannot be done
> when it can. That's just misdirection.
This time I was wrong. Nevertheless, the answer I should have got
was "no, you misunderstood, I want to delete the lines, not the files",
in which case I or someone else would have said, "oh, for *that* you
can just truncate the file".
-all-the-world's-a-critic-ly yr's,
Peter
More information about the Python-list
mailing list