6 questions
-6
votes
2
answers
253
views
Why doesn't RestrictedPython allow iter, max, min, sum, etc [closed]
The Python library Restricted Python by default doesn't include built-in functions like iter, max, min, sum, or any other function that does any form of iteration, as part of their default ...
1
vote
1
answer
348
views
How to allow _inplacevar_ operations in RestrictedPython?
Expressions such as:
total_impact += impact
in my restricted env are not allowed by default and they cause the error:
NameError: name '_inplacevar_' is not defined
but I would like to allow such ...
2
votes
1
answer
373
views
setter methods and Restricted Python
I have a class "MyClass" with a class attribute and its methods.
class MyClass:
def __init__(self):
self._my_attr = None
@property
def my_attr(self):
return self....
0
votes
1
answer
954
views
RestrictedPython - Name Is Not Defined
I want to safely execute some user defined code. To accomplish this, I want to use RestrictedPython to limit which modules and variables the user has access to. There are a few guidelines to the user-...
6
votes
2
answers
2k
views
RestrictedPython: Call other functions within user-specified code?
Using Yuri Nudelman's code with the custom _import definition to specify modules to restrict serves as a good base but when calling functions within said user_code naturally due to having to whitelist ...
0
votes
1
answer
246
views
Restrictedpython code evaluation executed in thread pool - function invoked twice
i'm using restrictedpython in my app in order to allow the "mid-skilled-user" to develop some pieces of additional code to execute as modular on-the-fly add-on.
For some architectural ...