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

Gerry Kirk gerry at faithonline.com
Wed Dec 31 15:55:07 EST 2003


Experimenting a bit further, it doesn't appear to be Windows-only. I
have a text editor that saves Unix linefeeds (\n) by default. I still
get the problem using that.

Gerry Kirk
Project Manager
www.faithonline.com 
www.dioceseonline.com


> -----Original Message-----
> From: Evan Simpson [mailto:evan at 4-am.com] 
> Sent: December 31, 2003 2:57 PM
> To: Gerry Kirk
> Cc: plone-users at lists.sourceforge.net; zope at zope.org
> Subject: Re: survey: zope 2.7 syntax errors with TAL 
> statments over multiple lines
> 
> 
> 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