append one file to another

Danny Nodal dnodal at
Tue Jul 12 16:52:47 CEST 2005

Its been a while since I last coded in Python, so please make sure you test
it before trying it so you don't clobber your existing file. Although it may
not be more effecient than what you are doing now or has been suggested
already, it sure cuts down on the typing.



<b83503104 at> wrote in message
news:1121176070.045217.264890 at
> Hi,
> I want to append one (huge) file to another (huge) file.  The current
> way I'm doing it is to do something like:
> infile = open (infilename, 'r')
> filestr =
> outfile = open(outfilename, 'a')
> outfile.write(filestr)
> I wonder if there is a more efficient way doing this?
> Thanks.

More information about the Python-list mailing list