diff --git a/Scripts/enhancer.py b/Scripts/enhancer.py index 6393c983f..bf79dfe48 100644 --- a/Scripts/enhancer.py +++ b/Scripts/enhancer.py @@ -39,7 +39,7 @@ class Enhance(Frame): s.pack() def update(self, value): - self.value = eval(value) + self.value = float(value) self.tkim.paste(self.enhancer.enhance(self.value)) # diff --git a/Scripts/pildriver.py b/Scripts/pildriver.py index 318584ad1..cc425ad08 100644 --- a/Scripts/pildriver.py +++ b/Scripts/pildriver.py @@ -208,7 +208,7 @@ class PILDriver(object): Process the top image with the given filter. """ from PIL import ImageFilter - imageFilter = eval("ImageFilter." + self.do_pop().upper()) + imageFilter = getattr(ImageFilter, self.do_pop().upper()) image = self.do_pop() self.push(image.filter(imageFilter)) diff --git a/Scripts/thresholder.py b/Scripts/thresholder.py index bfeebfa9f..50c4bbcd2 100644 --- a/Scripts/thresholder.py +++ b/Scripts/thresholder.py @@ -42,7 +42,7 @@ class UI(Frame): # self.redraw() def update_scale(self, value): - self.value = eval(value) + self.value = float(value) self.redraw()