python-intelhex / intelhex

Python IntelHex library
BSD 3-Clause "New" or "Revised" License
198 stars 106 forks source link

Support for comment character #25

Open pylessard opened 5 years ago

pylessard commented 5 years ago

Altough it is not normally supported by the .hex format, many vendors embed comments in their .hex file, which make them impossible to parse by IntelHex unless pre-cleaned programmatically.

It would be nice to be able to specify an optional comment character (;, #, --) that would make the parser ignore any line starting with it.

Or maybe ignore everything not starting with a record delimiter.

bialix commented 4 years ago

Sorry for not working on your issue. I'm looking for a new maintainer for Python IntelHex project. I hope someone will help.

tofkamp commented 1 year ago

I agree with pylessard, add an option to ignore every lien not starting with ":", or skip any error. Any logging captured will have some junk characters at the beginning and end. An other option to solve this, is to merge/add data to the IntelHex object from a string. With python one could easily run through every line of a file, and add it to the object when it starts with ":".