From 80b376b4fb03b023d28e41aa43be8d8c83077d99 Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Thu, 7 Nov 2019 16:49:01 -0800 Subject: [PATCH] Delay import of asteval --- jrnl/plugins/template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jrnl/plugins/template.py b/jrnl/plugins/template.py index 21fb2896..bdb1ebe4 100644 --- a/jrnl/plugins/template.py +++ b/jrnl/plugins/template.py @@ -1,5 +1,4 @@ import re -import asteval import yaml VAR_RE = r"[_a-zA-Z][a-zA-Z0-9_]*" @@ -39,6 +38,7 @@ class Template(object): return self._expand(self.blocks[block], **vars) def _eval_context(self, vars): + import asteval e = asteval.Interpreter(use_numpy=False, writer=None) e.symtable.update(vars) e.symtable['__last_iteration'] = vars.get("__last_iteration", False)