Beispiel #1
0
 def EvaluateString(self, script, glob, principal, url, lineno, ver):
     # This appears misnamed - return value it not used.  Therefore we can
     # just do a simple 'exec'.  If we needed a return value, we would have
     # to treat this like a string event-handler, and compile as a temp
     # function.
     assert type(glob) == types.DictType
     # compile then exec to make use of lineno
     co = domcompile.compile(script, url, lineno=lineno - 1)
     exec co in glob
 def EvaluateString(self, script, glob, principal, url, lineno, ver):
     # This appears misnamed - return value it not used.  Therefore we can
     # just do a simple 'exec'.  If we needed a return value, we would have
     # to treat this like a string event-handler, and compile as a temp
     # function.
     assert type(glob) == types.DictType
     # compile then exec to make use of lineno
     co = domcompile.compile(script, url, lineno=lineno-1)
     exec co in glob
Beispiel #3
0
 def CompileScript(self, text, scopeObject, principal, url, lineno,
                   version):
     # The line number passed is the first; offset is -1
     return domcompile.compile(text, url, lineno=lineno - 1)
 def CompileScript(self, text, scopeObject, principal, url, lineno, version):
     # The line number passed is the first; offset is -1
     return domcompile.compile(text, url, lineno=lineno-1)