Removed use of eval

This commit is contained in:
Andrew Murray 2016-05-10 23:07:16 +10:00
parent b1a528bf10
commit 6475530f65
3 changed files with 3 additions and 3 deletions

View File

@ -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))
#

View File

@ -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))

View File

@ -42,7 +42,7 @@ class UI(Frame):
# self.redraw()
def update_scale(self, value):
self.value = eval(value)
self.value = float(value)
self.redraw()