|
From: Ype K. <yk...@xs...> - 2001-09-01 09:06:59
|
Kevin, >How does this relate to Python's restricted execution mode? > >It seems there would be substantial overlap, but I haven't ever tried using rexec in Jython... > >http://py-howto.sourceforge.net/rexec/rexec.html Unfortunately, the rexec module is not available in jython. Ype. >kb > >Chr...@ge... wrote: >> >> Hi Folks, >> >> we are currently trying to use Jython to give users the possibility to >> enter python scripts to automate some steps in a Java application we are >> developing. We want to provide the users an API with Java Classes. But we >> want to restrict the user that he can only use these public Classes from >> the API. For this we first set Options.respectJavaAccessibility to true. To >> be able to restrict the user to the API the introduced a new interface >> JavaAccessInterceptor and made some small changes to class PyJavaClass. >> Mainly a new method setJavaAccessInterceptor(JavaAccessInterceptor >> anInterceptor) to set an interceptor and a call of the interceptor in the >> methods getAccessibleConstructors, getAccessibleFields and >> getAccessibleMethods. >> >> I did this changes in the python version 2.0. but I think it is also >> possible in the version 2.1a3. >> >> We think the change can be useful for other jython users and would like if >> you are able to ingrate the changes or provide something similar. >> What do you think about this ? >> >> Probably it would be better to call the interceptor also in the case when >> Options.respectJavaAccessibility is set to false..... >> >> Regards >> Christian. >> >> (See attached file: src.jar) >> > > |