jd-boyd / sexpdata

S-expression parser for Python
http://sexpdata.readthedocs.org
BSD 2-Clause "Simplified" License
88 stars 29 forks source link

sexpdata.dumps(tree, pretty_print=True) produces strange output with big data #57

Open olisnr opened 4 months ago

olisnr commented 4 months ago

when i use sexpdata to read eeschem-files (like https://github.com/snhobbs/eeschema-script-control does) that include images, then writing this sexpdata 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/or LF are missing.

its easy to see in the picture: Screenshot from 2024-07-02 23-27-29

top is the original file and bottom is the read into sexpdata and write again file.

olisnr commented 4 months ago

thats the demo-sw

format_test.py.zip