How to merge two binary files into one?

Grant Edwards grante at visi.com
Mon Apr 4 21:20:08 EDT 2005


On 2005-04-05, could ildg <could.net at gmail.com> wrote:

> I want to merge file A and file B into a new file C, All of
> them are binary.

file('C','wb').write(file('A','rb').read()+file('B','rb').read())

-- 
Grant Edwards                   grante             Yow!  ... or were you
                                  at               driving the PONTIAC that
                               visi.com            HONKED at me in MIAMI last
                                                   Tuesday?



More information about the Python-list mailing list