the problem is, that whiel eeschem puts the image in many lines, the sexpdata.dumps(tree, pretty_print=True) dose not. or in short, the CR and/or LF are missing.
its easy to see in the picture:
top is the original file and bottom is the read into sexpdata and write again file.
when i use
sexpdata
to read eeschem-files (like https://github.com/snhobbs/eeschema-script-control does) that include images, then writing thissexpdata
back to a new file renders it useless for eeschem (https://www.kicad.org/discover/schematic-capture/).the problem is, that whiel eeschem puts the image in many lines, the sexpdata.dumps(tree, pretty_print=True) dose not. or in short, the
CR
and/orLF
are missing.its easy to see in the picture:
top is the original file and bottom is the read into
sexpdata
and write again file.