RuntimeError: restricted attribute

Steven Bethard steven.bethard at gmail.com
Mon Mar 14 23:58:09 EST 2005


Does anyone know where the documentation for "restricted environments" 
is?  I see this referred to in the documentation for eval[1], but not 
explained.  Does eval use rexec?  I thought that was deprecated, but I 
get the following error:

py> eval('sub.func_globals', dict(__builtins__=None,
...                               sub=string.Template.substitute))
Traceback (most recent call last):
   File "<interactive input>", line 2, in ?
   File "<string>", line 0, in ?
RuntimeError: restricted attribute

Anyone know what this means or where I could find it explained?

Thanks,

STeVe

[1]http://docs.python.org/lib/built-in-funcs.html#l2h-23



More information about the Python-list mailing list