[Zope] Re: survey: zope 2.7 syntax errors with TAL statments over multiple lines

Evan Simpson evan at 4-am.com
Wed Dec 31 14:57:24 EST 2003


Gerry Kirk wrote:
> Any time a TAL statement extends over multiple lines, I get a syntax 
> error, like this one:
> 
> in expression "python:test( no_types == 1\r\n , 
> 'Add New ' + types[0].Title()\r\n , 'Add New Item')"

I see a problem -- those '\r\n' shouldn't be there.  Python on Linux, 
and ZPT, expect all lines to end with '\n'.  I'm not sure how these are 
slipping in, but I suspect that the cause is writing ZPT text using a 
Windows tool.  We can fix this when reading from a file by using the new 
'U' mode.

Cheers,

Evan @ 4-am




More information about the Zope mailing list