[Zope] External Method Question
Tim Owen
timowen@voyager.net
Sun, 27 Jan 2002 13:19:03 -0500
The >>> and <<< are just separators in the email and not in the code.
I tried to run the script in the python interpreter and it complained as
well. Will look at the file and position of characters further.
Thanks.
----- Original Message -----
From: "Dieter Maurer" <dieter@handshake.de>
To: "Tim Owen" <timowen@voyager.net>
Cc: <zope@zope.org>
Sent: Sunday, January 27, 2002 1:15 PM
Subject: Re: [Zope] External Method Question
> Tim Owen writes:
> > ... External Method ...
> > >>>
> >
> > def valid_email(address, debug=None):
> > ...
> > Zope Error
> > Zope has encountered an error while publishing this resource.
> >
> > Error Type: SyntaxError
> > Error Value: invalid syntax (email_checker.py, line 1)
> Apparently, you did nothing wrong. At least, it is not obvious.
>
> But the problem must be really easy to fix:
>
> Python is unable to parse your code. It find a syntactical
> error in line 1.
>
> I assume the ">>>" is not really in your code. If it were, this
> would be the problem.
>
> Otherwise, Python is very sensitive to indentation. Your code
> must start in column 1 (when you start counting with 1).
>
> Run the Python interpreter on your file:
>
> python email_checker.py
>
> If it complains about the syntax, you need to find the reason and
> fix it. If not, there has been a very short lived bug in Zope
> that let it have problems with "\r\n" line endings (i.e. Windows like
> line endings). A Zope upgrade may remove the problem in this case.
> But it is not very likely, that you have precisely this Zope version...
>
>
> Dieter
>