Closed fncode246 closed 2 years ago
I want to extract the data from S19 file. I decided to convert it to binary in this way (as it is done in:https://stackoverflow.com/questions/24110121/how-to-manipulate-srec-file/45465864#45465864)
import bincopy f = bincopy.BinFile() f.add_srec_file("New.s19") f.as_binary()
Then I want to save this object and extract data part. I use .write to save but it has "TypeError: write() argument must be str, not BinFile" error.
with open('out.txt', 'w') as w: w.write(f)
How should i save it and what is your idea? Thanks
import bincopy f = bincopy.BinFile() f.add_srec_file("New.s19") with open('out.txt', 'wb') as w: w.write(f.as_binary())
I want to extract the data from S19 file. I decided to convert it to binary in this way (as it is done in:https://stackoverflow.com/questions/24110121/how-to-manipulate-srec-file/45465864#45465864)
Then I want to save this object and extract data part. I use .write to save but it has "TypeError: write() argument must be str, not BinFile" error.
How should i save it and what is your idea? Thanks