Triple quote problem in Pythonwin
Tim Peters
tim_one at email.msn.com
Mon May 29 22:44:24 EDT 2000
[dej]
> ... have come across a problem with triple quotes in Pythonwin
> build 125. For example, the following results in a
> "SyntaxError: invalid token" in Pythonwin:
>
> s="""
>
> or if I type in:
>
> """Here is a very long string that can
> if we wish span several...
>
> I get the "SyntaxError: invalid token" as well.
Works for me:
>>> s = """Here is
... a not so very
... long line"""
>>> s
'Here is\012a not so very\012long line'
>>>
That's pasted from a PythonWin build 125 shell.
> ... I am running Win98 Japanese version but I don't think the
> problem is related to the OS.
The above was from Win95 US.
Something to try: at the end of the line, press & hold the Ctrl key while
you hit ENTER. If that works, ask Mark Hammond to explain why; if that
doesn't work, ask Mark why it doesn't <wink>.
long-lines-short-lives-ly y'rs - tim
More information about the Python-list
mailing list