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>:
LOL :D
>
> 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!
>
But hey, this is valid Python :D :D
for x in texrange(r"$b \cdot \sum_{i=1}^n \frac{x^n}{n!}$"): pass
import texcode
texcode.texecute("""
\eq{y}{\range{1}{10}}
\for{x}{y}{
\print{x}
}
""") # Alas, the joy has to end