with open('/tmp/fin.pdf', 'rb') as f1:
    with open('/tmp/test.pdf', 'wb') as f2:
        while True:
            b = f1.read(1)
if b:
    n = f2.write(b)
else:
    break
Python writing binary files, bytes