On 8/6/11 7:55 AM, Ivan Andrus wrote:
On Jul 30, 2011, at 11:40 AM, Juanlu001 wrote:
I have tested multiple interacts of mine and some computations, and
everything seems to work quite well except for the backslash \, which
I tried to use to split lines. It gives a syntax error:
SyntaxError Traceback (most recent call last)
SyntaxError: invalid syntax (<string>, line 57)
The line number depends on the length of the code.
Anyway, well done :)
I have to say that the SyntaxError messages are not very helpful. e.g.
It says line 39 when I've only given it one line of input. Is there a
way to get a better error message?
Yes. We need to write the input to a file and then execute that file.
Then we'd get a traceback that includes the code at the specific line.
It says line 39 because we always tack on a few lines at the beginning
of a script to set things up.
Also they seem to have shell escape sequences in them. Do you strip them
out in the javascript?
Those are for syntax highlighting of Traceback sequences in the
terminal, I believe. Javascript converts them to colors, like your
shell would.
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org