RuntimeError: restricted attribute

S

Steven Bethard

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,222
Messages
2,571,142
Members
47,756
Latest member
JulienneY0

Latest Threads

Top