File processing

fishers m.e.l at btclick.com
Mon Feb 17 12:31:57 EST 2003


Hi Peter

Thanks for your response. What I am trying to do in this case is just to
join one file (e.g. 'two.txt') to the end of another (e.g. 'one.txt'). I
could tell from your answer that there are two ways to approach this. It
seemed to me though that using open (or file?) would then involve some code
to copy the data from the two.txt to one.txt. I was just trying to avoid
this.

rgds

Steve

> >
> > > Yes, it can manipulate the files directly, using open() with read and
> > > write/append modes, or it could execute shell utilities via os.system.
> > >
> > > It does not support a simple "append these two files" command, so far
> > > as I know.  No need for one, either...
> >
> > because of os.system ? (i'm new to Python)
>
> I'm not sure what you mean... are you completely my sentence that began
> "no need for one, either..." ?
>
> If you are, I assume you didn't understand my first paragraph, where I
> was attempting to show that there are in fact at least *two* ways to
> do what you describe, and rather simple ones at that, so depending on
> your specific needs you can pick one or the other, and that therefore
> Python really doesn't *need* a built-in technique for doing this
> relatively rare operation.
>
> So I would say, "Yes, because of os.system, and because of the other
> approach I mentioned."
>
> But I might be missing your point, or your problem, or something...
>







More information about the Python-list mailing list