[IronPython] PythonEngine in separate AppDomain?

michael_sweeney at agilent.com michael_sweeney at agilent.com
Wed May 23 18:22:05 CEST 2007


Hi Dino,

 

I get this error with or without the permission code. Here is the problem I am trying to solve...

 

We have a test tool that allows the load/reload of Python test scripts. It is implemented in CPython. We manipulate the sys.modules dictionary to "clean" out any modules the test module loaded. This "cleaning" allows the developers to quickly run/edit/reload/run the test scripts. We are porting this application to IronPython by hosting the PythonEngine in a C# application. The new tool allows the user to load .NET assemblies as well as the classic python modules. The ability to reload is handy. Since it is possible to unload AppDomains for the assembly based tests, I was thinking that just putting the PythonEngine in a separate AppDomain I could handle the unload the same way. This is when I started running into permission issues.

 

I wanted to avoid the "cleaning" of the sys.modules dictionary because it has proved error-prone in the CPython implementation. I may have to start going down this path.

 

Thanks for your feedback.

 

Mike

 

 

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland
Sent: Tuesday, May 22, 2007 1:54 PM
To: Discussion of IronPython
Subject: Re: [IronPython] PythonEngine in separate AppDomain?

 

Are you getting this even if you don't do anything w/ permissions?  

 

You're going to have a tough time running IronPython in partial trust before .NET 2.0 SP1 or Orcas.  In SP1 of the CLR (which is the CLR included w/ Orcas and I believe will ship stand-alone as its own SP at some point) various portions of Reflection.Emit have had the appropriate security hardening to ensure they work properly in partial trust.  Unfortunately both of those are still beta code L.

 

 

Thanks in advance...

 

Mike

 

  

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20070523/eafd1285/attachment.html>


More information about the Ironpython-users mailing list