William Purcell wrote:
I want to use eval to evaluate wx.TextCtrl inputs. How can I keep
python from adding the __builtins__ key to mydict when I use it with
eval? Other wise I have to __delitem__('__builtins__') everytime I use
eval?
>>> mydict = {'a':2,'b':3}
>>> eval('a*b',mydict)
6
>>> my
I want to use eval to evaluate wx.TextCtrl inputs. How can I keep python
from adding the __builtins__ key to mydict when I use it with eval? Other
wise I have to __delitem__('__builtins__') everytime I use eval?
>>> mydict = {'a':2,'b':3}
>>> eval('a*b',mydict)
6
>>> mydict
{'a': 2, '__builtins__'