2

I need to read an a2l file in python, make some modifications to the file itself based on a function and save it again to an a2l file. As far as I have checked there is a library 'pya2l' (https://github.com/Sauci/pya2l) in python but the examples aren't complete. In this library, a2l string has to be given as such and there isn't any way to read a file as it is.

Kindly share your feedback if you have any suggestions!

Ashwini
  • 393
  • 2
  • 9

1 Answers1

1

You can convert the content of a2l file to string and use that string.

a2l_string = open(r'C:\Users\vaasu\Desktop\Data\examples\ASAP2_Demo_V161.a2l', 'r').read()

or

you can checkout this library Another library

srinivast6
  • 309
  • 3
  • 8