title: Genshi if else statement
body: <p>I have been try ot get genshi py:if to work with python expression.
  To make things simple I try the following code.</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:py="http://genshi.edgewall.org/"&gt;
    &lt;body&gt;
      &lt;py:if test = ${len(linstoflinks)&gt;0}&gt;
        &lt;p&gt;List has lenght&lt;/p&gt;
      &lt;/py:if&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>In the Genshi docs they say I can put any python expressions
  as long I put my expression in curly braces with a dollar sign in front.
  <a href="http://genshi.edgewall.org/wiki/GenshiTutorial" rel="nofollow">http://genshi.edgewall.org/wiki/GenshiTutorial</a>.
  I even try </p>
  
  <pre><code>&lt;py:if test = "${True}"&gt;
  &lt;py:if test = "${1==1}"&gt;
  </code></pre>
  
  <p>This simple code does not work. error is : not well formed (invalid token)
  This works </p>
  
  <pre><code>&lt;py:if test = "foo"&gt;
  </code></pre>
  
  <p>Anyone has any idea how I can make this if statement work with python expression.
  Thanks</p>