--- Quoted from http://docs.python.org/tut/node5.html ---
If we make the string literal a "raw" string, however, the \n
sequences are not converted to newlines, but the backslash at the end
of the line, and the newline character in the source, are both
included in the string as data. Thus, the example:
hello = r"This is a rather long string containing\n\
several lines of text much as you would do in C."
This is a rather long string containing\n\
several lines of text much as you would do in C.
--- End quote ---
In Jython2.2b1 + Windows 98, I have JEditorPanes that displays HTML
text. I tried the 'raw' literal like this:
html_txt = r"<head>
more text here after a new line...."
However, I get this error:
SyntaxError: Lexical error at line 39, column 21. Encountered: "\r"
(13), after : ""
Is this not possible in Jython? Btw, we still use old computers at
work -- hence, the Windows 98. It works fine aside from the extremely
slow loading time.
Thanks in advance.
Get latest updates about Open Source Projects, Conferences and News.