mcmtroffaes / pycddlib

A Python wrapper for Komei Fukuda's cddlib.
http://packages.python.org/pycddlib/
GNU General Public License v2.0
61 stars 9 forks source link

Max string length is too small #39

Closed dimy93 closed 4 years ago

dimy93 commented 4 years ago

You set it to 20000 but mere 92 x 6, V-representation created from H-representation on floats and converted to fractions cuts 2/3 of the file. Please substaintially increase it or even better get rid of it all together. Another option will be to create actual API for writting to files. In either case as it is it's unusuable

mcmtroffaes commented 4 years ago

Sure, the cddlib file writing API could be exposed directly. I'd prefer also to patch the __str__ method properly. One way might be to let _tmpread read in chunks and then to use PyUnicode_DecodeUTF8Stateful and join the decoded chunks together. Happy to take a patch.