18 Dec
2002
18 Dec
'02
8:14 p.m.
class Foo: ... def __init__(self): ... self.myhex = '0x2a' ... def bar(self): ... print chr(eval(self.myhex)) ... foo = Foo() foo.bar()
If the following works: * in Zope's python console (2.1.3), But in a Zope Python product method the same sort of thing fails: Error Type: SyntaxError Error Value: unexpected EOF while parsing (line 0) (specifically, its a Formulator Form method, and the self.myhex is a stringfield property of the Form instance) is it because eval is restricted even in a python product? Restricting eval() would seem to be an necessary security step, just wanted to check to make sure that's what causes the syntax error. Thanks