On 13 October 2012 19:29, Sturla Molden <sturla@molden.no> wrote:
Den 13. okt. 2012 kl. 06:44 skrev Devin Jeanpierre <jeanpierreda@gmail.com>:

>
> Python has cleverly left the $ symbol unused.
>
> We can use it as a quasiquote to embed executable TeX.
>
>    for x in xrange($b \cdot \sum_{i=1}^n \frac{x^n}{n!}$):
>        ...
>
> No need to wait for that new language, we can have a rich set of math
> operators today!
>


LOL :D

But hey, this is valid Python :D :D

for x in texrange(r"$b \cdot \sum_{i=1}^n \frac{x^n}{n!}$"): pass

I am glad someone else shares the same progressive attitude. I, personally, wrap my whole code like so:

import texcode 
 
texcode.texecute("""
\eq{y}{\range{1}{10}}
\for{x}{y}{
    \print{x}
}
""")  # Alas, the joy has to end

Which has tremendously improved the quality of my output.
Recently, rendering my code, too, has sped up to a remarkable 3 pages-per-minute!