I am trying to generate a html file with genshi
<li py:for="item in items">
${item.name}
<ul>
<?python
subc = list(item.subitems())
?>
<li py:for="it in subc">
${it.name}
</li>
</ul>
</li>
I get an error (unexpected EOF while parsing in expression "iter(subc)". Item is a peewee class, where i defined subitems(). Is it possible to use genshi this way, so that I don't have to create a tree with all the results first?
I have already used item.subitems() elsewhere. If I write a small app that print all on the fly, it works.
edit: it works. there was a parenthesis near subc. I won't delete this question, hoping that more people will see the power of peewee and genshi