Message1495

Author codecraig
Recipients
Date 2007-02-19.18:44:20
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Jython can't handle strings over 32767 characters....


StringBuffer sb = new StringBuffer();
for (int i = 0; i < 32768; i++) {
    sb.append("a");
}

PythonInterpreter pi = new PthonInterpreter();
pi.exec("data = {}");

String x = "data[\"stuff\"] = {\"val\" : \"" + sb + \"}";
pi.exec(x);


When the line, "pi.exec(x)" is execute the following exception occurs:

Exception in thread "main" Traceback (innermost last):
  (no code object) at line 0
SyntaxError: ('string constant too large (more than 32767 characters)', ('<string>', 1, 23, ''))

Can this be fixed?
History
Date User Action Args
2008-02-20 17:17:45adminlinkissue1663711 messages
2008-02-20 17:17:45admincreate