pythonnet appdomain(s)
Hello, Is there a design reason that pythonnet loads C# assemblies into its own AppDomain rather than establishing a separate AppDomain? It would be useful for instance when developing in C# in parallel with writing python code (say, in the ipython REPL) to be able to reload C# assemblies dynamically. Also, we've found it useful in Initialize() to enable shadow copying, to prevent file locking, ie internal static void Initialize() { ... AppDomain domain = AppDomain.CurrentDomain; // prevent file locking domain.SetShadowCopyFiles(); domain.SetShadowCopyPath(null); Although these are deprecated methods, and really it should be establishing a new AppDomain as above. Regards, Adam _________________________________ Adam D Klein BlueMountain Capital Management LLC 280 Park Ave, 5th Floor East New York, NY 10017 O:(212)905-2136 C:(917)331-8871
Hi Adam, Did you manage to setup a separate AddDomain for pythonnet? If yes, then there is an open issue on github where you can comment with your approach. https://github.com/pythonnet/pythonnet/issues/213 Thanks, Denis On Fri, Nov 14, 2014 at 1:16 PM, Adam Klein <aklein@bluemountaincapital.com> wrote:
Hello,
Is there a design reason that pythonnet loads C# assemblies into its own AppDomain rather than establishing a separate AppDomain? It would be useful for instance when developing in C# in parallel with writing python code (say, in the ipython REPL) to be able to reload C# assemblies dynamically.
Also, we’ve found it useful in Initialize() to enable shadow copying, to prevent file locking, ie
internal static void Initialize() {
...
AppDomain domain = AppDomain.CurrentDomain;
// prevent file locking
domain.SetShadowCopyFiles();
domain.SetShadowCopyPath(null);
Although these are deprecated methods, and really it should be establishing a new AppDomain as above.
Regards,
Adam
_________________________________
Adam D Klein
BlueMountain Capital Management LLC
280 Park Ave, 5th Floor East
New York, NY 10017
O:(212)905-2136
C:(917)331-8871
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
participants (2)
-
Adam Klein
-
Denis Akhiyarov