i need to change the a line in the ascii header of a huge .ply binary file (point cloud format)[see : http://paulbourke.net/dataformats/ply/ ]. I don't need to change anything else.
I'm using python 3.7
i've already been through some solution to replace in text files [How to search and replace text in a file using Python? but neither the Jack Aidley solution's nor jfs solution's match my needs. The first mean to load and rewrite the entire file, which in my case need to be avoided. The second isn't possible with the binary parts of the file.
I need to go from that :
ply
***rest of the header****
property list int int vertex_indices
end_header
^Q(^LI<99><A7> ***rest of the huge binary parts***
to that :
ply
***rest of the header****
property list uchar int vertex_indices
end_header
^Q(^LI<99><A7> ***rest of the huge binary parts***