mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 08:38:32 +02:00
#6 allowing template interpreter to interpret common Python commands
This commit is contained in:
parent
b56026d989
commit
ccf0b7e039
1 changed files with 2 additions and 1 deletions
|
@ -39,7 +39,8 @@ class Template(object):
|
|||
return self._expand(self.blocks[block], **vars)
|
||||
|
||||
def _eval_context(self, vars):
|
||||
e = asteval.Interpreter(symtable=vars, use_numpy=False, writer=None)
|
||||
e = asteval.Interpreter(use_numpy=False, writer=None)
|
||||
e.symtable.update(vars)
|
||||
e.symtable['__last_iteration'] = vars.get("__last_iteration", False)
|
||||
return e
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue