Thanks Francois, It worked as expected. ------------------------------------------------------------------------------- source_data = open("source_data.bin", 'rb').read() search_data = open("search_data.bin", 'rb').read() replace_data = open("replace_data.bin", 'rb').read() outFile = open("mod.bin", 'wb')
file_offset = source_data.find(search_data) print "file_offset:", file_offset outData = source_data.replace(search_data, replace_data) outFile.write(outData) outFile.close print "" -- http://mail.python.org/mailman/listinfo/python-list