You'll want to apply CodeAccessSecurity constraints to limit access to
various pieces of functionality like Assembly.Load, etc...
Basically, before you run any of this "untrusted" code, you should enter
a minimum security context that specifically does not have permission to
access the filesystem
There's two ways I can think of how to enforce the time limit:
1. An external monitor which aborts the thread when a quantum has
expired. This has the problem of potentially aborting at any native CPU
instruction which most code is in no way prepared to handle. Therefore
2. Update
There is a way to compile Python sources into a dll (there's a "pyc" sample on
the codeplex website), however it will not produce a dll that is easily used
from C# or VB. It is the dynamic nature of Python that makes it hard to compile
into classes and methods in the same fashion as C# or VB do.
Hi,
I'm evaluating IronPython for use as a scripting language in a game server.
Designers would use it for game-logic.
Because designers typically are not engineers, one cannot expect them to
follow common good practices. So I need to restrict what their script code
can do in a few ways:
a
As a C+ newbie.
I am tring to write the MSN add-in in C# and use IronPython (Python, my
favorite) actually.
The following code can be compiled successfully (in VC# Studio).
But it fails to be imported to be Messenger Add-in.
The problem happens to create PythonEngine in Initialize().
Any Hints?
Th
A: IronPython does not support building DLLs for a C# style of linking and
calling into Python code. You can define interfaces in C#, build those into
a DLL, and then implement those interfaces in Python code as well as pass
the python objects that implement the interfaces to C# code.
Can Someon