diff --git a/src/asammdf/gui/utils.py b/src/asammdf/gui/utils.py index c125cc58b..0efd5cd39 100644 --- a/src/asammdf/gui/utils.py +++ b/src/asammdf/gui/utils.py @@ -490,10 +490,26 @@ def compute_signal( f"{description['function']} not found in the user defined functions", ) + import bisect + import collections + import itertools + import random + import struct + + _builtins = dict(collections.__builtins__) + for key in ("breakpoint", "compile", "eval", "exec", "input", "open", "__import__"): + del _builtins[key] + _globals = { + "bisect": bisect, + "collections": collections, + "itertools": itertools, "math": math, "np": np, "pd": pd, + "random": random, + "struct": struct, + "__builtins__": _builtins, } for function_name, definition in functions.items(): diff --git a/src/asammdf/version.py b/src/asammdf/version.py index 38581531a..5e36b1e0d 100644 --- a/src/asammdf/version.py +++ b/src/asammdf/version.py @@ -1,3 +1,3 @@ """ asammdf version module """ -__version__ = "8.0.0.dev17" +__version__ = "8.0.0.dev18"