Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
--- 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.