adityam / filter

ConTeXt module to process contents of a start-stop environment through an external program
45 stars 10 forks source link

modes makes fails t-filter with python #17

Closed ghost closed 10 years ago

ghost commented 10 years ago

Hi,

With this minimal example


\usemodule[filter]

\defineexternalfilter
    [python]
    [filtercommand={python \externalfilterinputfile\space > \externalfilteroutputfile},cache=force]

\starttext
\doifmode{solucions}{

\starttextrule{Solucions}

\startpython
from sympy.solvers import solve
from sympy import Symbol
from sympy import Eq

x = Symbol('x')
print(solve(Eq(3*x + 2, 35), x))
\stoppython

\stoptextrule

}

\stoptext

I get a "always-running".... if I do context --mode=solucions. I use latest MKIV.

ghost commented 10 years ago

Is it possible that with \startmode, \stopmode it works?

adityam commented 10 years ago

I am closing this issue because it has already been answered on the context mailing list.

ghost commented 10 years ago

Yes. thanks.