RuntimeError: restricted attribute

Steven Bethard steven.bethard at
Tue Mar 15 05:58:09 CET 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?




More information about the Python-list mailing list