On Feb 21, 1:53 am, Pedro Cruz <[email protected]> wrote:
> I'm going to add
> input += '_interact_.SAGE_CELL_BZ2TEXT=%r\n' %
> bz2.compress(C.input_text())
> It uses bz2 because it's already on worksheet.py and to avoid
> string_inside_string problems.
You may want to consider
input += '_interact_.SAGE_CELL_BZ2TEXT=%r\n'
%C.input_text().encode("base64")
instead. It leads to smaller (short) strings and is much easier
computationally. It will also solve your problem better, because
base64 is meant for this. The result of a compressor could easily
contain problematic characters.
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org