Library for text substitutions with calculations?
2QdxY4RzWzUUiLuE at potatochowder.com
2QdxY4RzWzUUiLuE at potatochowder.com
Tue Dec 15 10:41:56 EST 2020
On 2020-12-15 at 16:04:55 +0100,
Jan Erik Moström <lists at mostrom.pp.se> wrote:
> I want to do some text substitutions but a bit more advanced than what
> string.Template class can do. I addition to plain text substitution I would
> like to be able to do some calculations:
>
> $value+1 - If value is 16 this would insert 17 in the text. I would also
> like to subtract.
[...]
A lot of libraries for making web pages can do things like that; a
starting point is <https://wiki.python.org/moin/Templating>.
HTH,
Dan
More information about the Python-list
mailing list