<span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><div>Sorry, I don&#39;t know if my previous message have arrived. So, here it is:</div><div><br></div><div>
<br></div>Hello all,<div><br></div><div>I am starting with python and I would like to add to my web application some web services. This services will allow the different clients of my application to execute some python scripts. </div>


<div><br></div><div>I would like to know if someone did this before and how can I do this in a secure way. I mean, how can I do to restrict the environment where the scripts will be executed. </div><div><br></div><div>In .net I can do this using the AppDoman and setting the permission set.</div>


<div><br></div><div><span style="color:rgb(51, 51, 51);font-family:&#39;Courier New&#39;;line-height:14px">AppDomain.CreateDomain( <font color="#0000ff">string</font> friendlyName,<br>                        Evidence securityInfo,<br>


                        AppDomainSetup info,<br>                        PermissionSet grantSet,<br>                        <font color="#0000ff">params</font> StrongName[] fullTrustAssemblies);</span></div><div><br></div>


<div><br></div><div>Is there a way to do the same with my python scripts? </div><div><br></div><div>I am running them using this:</div><div><br></div><div><div>ScriptEngine engine = Python.CreateEngine();</div><div>ScriptSource source = engine.CreateScriptSourceFromString(scriptAsString);</div>


<div>ScriptScope scope = engine.CreateScope();</div><div>source.Execute(scope);</div><div><br></div><div>Thanks in advance.</div><div>Nicolas</div></div></span>