Terry Babbey writes:
> Here is my code and my error.
>
>
>
>
>
>
>
>
> Zope has encountered an error while publishing this resource.
>
>Error Type: IndexError
>Error Value: string index out of range
>
> CL is a property of a dtml document and is a list of courses for a
> given program. My goal is to test character 8 of each line and if it
> is a - (dash) then it represents a course name which I will usr to
> point to a course description.
> Any help?
One of the list elements is empty, there is no index "0".
Try:
contains '-' as 8.th character
"item[7:8]" gives the 8.th character, if it exists, and otherwise
the empty string.
Dieter
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )