Possible to relax code restrictions?

Hi,

 

I'm wondering if it is possible to slightly relax the restrictions imposed by the RestrictedPython package?  I keep running into its walls for simple little things that could have made implementing my channel easier, like having classes with __getattr__ methods or which manipulate their own __dict__ or even just importing 3rd-party modules which happen to use __file__ or which have functions or methods that start with a "_".  It's been frustrating.

 

Thanks,

Robin

If you post it here, then you'll get my vote, as well as lost of others I'm sure

/T

Done.  Everybody go vote!  :)

I dug into the framework code some more and I found that the code restrictions can be relaxed a little bit by setting this in the Info.plist:

PlexPluginCodePolicy
Elevated
 
It still has more restrictions than what I think is neccessary, but it at least allows things like __getattr__ methods and a few other things.  It still doesn't allow __dict__ but I can work around that.
 
I also found code dealing with a whitelist of modules set with PlexPluginModuleWhitelist in Info.plist, but either it does not do what I expected it to from reading the code, or it is ignored for modules located in the plugin bundle.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.