Commit ddba3619 authored by Jim Fulton's avatar Jim Fulton

The last change shouldn't have been made here. It should have been in DT_Util.

parent e6a756ad
"""Very Safe Python Expressions """Very Safe Python Expressions
""" """
__rcs_id__='$Id: VSEval.py,v 1.13 1998/05/13 21:10:30 jim Exp $' __rcs_id__='$Id: VSEval.py,v 1.14 1998/05/13 21:46:51 jim Exp $'
############################################################################ ############################################################################
# Copyright # Copyright
...@@ -11,7 +11,7 @@ __rcs_id__='$Id: VSEval.py,v 1.13 1998/05/13 21:10:30 jim Exp $' ...@@ -11,7 +11,7 @@ __rcs_id__='$Id: VSEval.py,v 1.13 1998/05/13 21:10:30 jim Exp $'
# rights reserved. # rights reserved.
# #
############################################################################ ############################################################################
__version__='$Revision: 1.13 $'[11:-2] __version__='$Revision: 1.14 $'[11:-2]
from string import join, find, split, translate from string import join, find, split, translate
import sys, gparse, string import sys, gparse, string
...@@ -110,7 +110,7 @@ class Eval: ...@@ -110,7 +110,7 @@ class Eval:
self.used=tuple(used.keys()) self.used=tuple(used.keys())
def eval(self, mapping): def eval(self, mapping):
d={'_vars': mapping, '_': mapping} d={'_vars': mapping}
code=self.code code=self.code
globals=self.globals globals=self.globals
for name in self.used: for name in self.used:
...@@ -132,6 +132,9 @@ compiled_getattr=compile( ...@@ -132,6 +132,9 @@ compiled_getattr=compile(
############################################################################ ############################################################################
# #
# $Log: VSEval.py,v $ # $Log: VSEval.py,v $
# Revision 1.14 1998/05/13 21:46:51 jim
# The last change shouldn't have been made here. It should have been in DT_Util.
#
# Revision 1.13 1998/05/13 21:10:30 jim # Revision 1.13 1998/05/13 21:10:30 jim
# Changed the way that '_' is handled. It is now an alias for the template dict. # Changed the way that '_' is handled. It is now an alias for the template dict.
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment