<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-14449</id>
	<title>Nabble - IronPython</title>
	<updated>2009-11-09T12:47:53Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/IronPython-f14449.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/IronPython-f14449.html" />
	<subtitle type="html">&lt;a href=&quot;http://ironpython.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;IronPython&lt;/a&gt;&amp;nbsp;is a new Python implementation targeting the .NET and Mono platforms. This list is a place to discuss anything about IronPython from uses to implementation details. It can also be used to ask questions related to running other dynamic languages on the CLR.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26273406</id>
	<title>Fail to execute &quot;import System&quot; on Silverlight embedded interpreter</title>
	<published>2009-11-09T12:47:53Z</published>
	<updated>2009-11-09T12:47:53Z</updated>
	<author>
		<name>Kay Schluehr-2</name>
	</author>
	<content type="html">Hi IronPython list,
&lt;br&gt;&lt;br&gt;I worked along Michael Foords introductory article about embedding 
&lt;br&gt;IronPython in Silverlight together with his 
&lt;br&gt;&amp;quot;EmbeddingIronPythonSilverlight&amp;quot; project documented here:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.voidspace.org.uk/ironpython/silverlight/embedding_ironpython.shtml&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.voidspace.org.uk/ironpython/silverlight/embedding_ironpython.shtml&lt;/a&gt;&lt;br&gt;&lt;br&gt;I added the following two lines to the source code
&lt;br&gt;&lt;br&gt;&amp;nbsp; source = pe.CreateScriptSourceFromString(&amp;quot;import System&amp;quot;, 
&lt;br&gt;SourceCodeKind.Statements);
&lt;br&gt;&amp;nbsp; source.Execute(scope);
&lt;br&gt;&lt;br&gt;This worked all well with the given built and the shipped assemblies.
&lt;br&gt;&lt;br&gt;Yesterday I downloaded the DLR dlr-34133, built it and replaced the 
&lt;br&gt;assemblies of the &amp;quot;EmbeddingIronPython...&amp;quot; project with the latest 
&lt;br&gt;SilverlightDebug ones. Running the code
&lt;br&gt;again I get following import error:
&lt;br&gt;&lt;br&gt;System.NullReferenceException wurde nicht von Benutzercode behandelt.
&lt;br&gt;&amp;nbsp; Message=&amp;quot;Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.&amp;quot;
&lt;br&gt;&amp;nbsp; StackTrace:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bei Microsoft.Scripting.Silverlight.DynamicApplication.get_BaseUri()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bei 
&lt;br&gt;Microsoft.Scripting.Silverlight.DynamicApplication.MakeUri(Uri baseUri, 
&lt;br&gt;Uri relativeUri)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bei 
&lt;br&gt;Microsoft.Scripting.Silverlight.HttpVirtualFilesystem.GetFileInternal(Object 
&lt;br&gt;baseUri, Uri relativeUri)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bei 
&lt;br&gt;Microsoft.Scripting.Silverlight.BrowserVirtualFilesystem.GetFileInternal(Object 
&lt;br&gt;storageUnit, String relativePath)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bei 
&lt;br&gt;Microsoft.Scripting.Silverlight.BrowserVirtualFilesystem.GetFile(Object 
&lt;br&gt;storageUnit, String relativePath)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bei 
&lt;br&gt;Microsoft.Scripting.Silverlight.BrowserVirtualFilesystem.GetFile(String 
&lt;br&gt;relativePath)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bei Microsoft.Scripting.Silverlight.BrowserPAL.FileExists(String 
&lt;br&gt;path)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bei IronPython.Runtime.Importer.LoadModuleFromSource(CodeContext 
&lt;br&gt;context, String name, String path)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bei IronPython.Runtime.Importer.LoadPackageFromSource(CodeContext 
&lt;br&gt;context, String name, String path)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bei IronPython.Runtime.Importer.LoadFromDisk(CodeContext context, 
&lt;br&gt;String name, String fullName, String str)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bei IronPython.Runtime.Importer.ImportFromPathHook(CodeContext 
&lt;br&gt;context, String name, String fullName, List path, Func`5 defaultLoader)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bei IronPython.Runtime.Importer.ImportFromPath(CodeContext 
&lt;br&gt;context, String name, String fullName, List path)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bei IronPython.Runtime.Importer.ImportTopAbsolute(CodeContext 
&lt;br&gt;context, String name)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bei IronPython.Runtime.Importer.ImportModule(CodeContext context, 
&lt;br&gt;Object globals, String modName, Boolean bottom, Int32 level)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bei IronPython.Modules.Builtin.__import__(CodeContext context, 
&lt;br&gt;String name, Object globals, Object locals, Object fromlist, Int32 level)
&lt;br&gt;&amp;nbsp; InnerException:
&lt;br&gt;&lt;br&gt;&lt;br&gt;Apparently, pre-loading assemblies in the loop
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; foreach (string name in new string[] { &amp;quot;mscorlib&amp;quot;, &amp;quot;System&amp;quot;, 
&lt;br&gt;&amp;quot;System.Windows&amp;quot;, &amp;quot;System.Windows.Browser&amp;quot;, &amp;quot;System.Net&amp;quot; })
&lt;br&gt;&amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;runtime.LoadAssembly(runtime.Host.PlatformAdaptationLayer.LoadAssembly(name));
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;had no effect and IronPython attempts to load the 'System' module from 
&lt;br&gt;the disk as a Python module. The standard import
&lt;br&gt;routine &amp;quot;import clr; clr.AddReference(&amp;quot;System&amp;quot;); import System&amp;quot; causes 
&lt;br&gt;the same problem. I'm puzzled.
&lt;br&gt;&lt;br&gt;Regards, Kay
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26273406&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Fail-to-execute-%22import-System%22-on-Silverlight-embedded-interpreter-tp26273406p26273406.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26271561</id>
	<title>Re: Safe execution of python scripts on my .net	application</title>
	<published>2009-11-09T10:44:37Z</published>
	<updated>2009-11-09T10:44:37Z</updated>
	<author>
		<name>Dino Viehland</name>
	</author>
	<content type="html">&lt;META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html; charset=iso-8859-1&quot;&gt;
&lt;html xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:x=&quot;urn:schemas-microsoft-com:office:excel&quot; xmlns:p=&quot;urn:schemas-microsoft-com:office:powerpoint&quot; xmlns:a=&quot;urn:schemas-microsoft-com:office:access&quot; xmlns:dt=&quot;uuid:C2F41010-65B3-11d1-A29F-00AA00C14882&quot; xmlns:s=&quot;uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882&quot; xmlns:rs=&quot;urn:schemas-microsoft-com:rowset&quot; xmlns:Z=&quot;urn:schemas-microsoft-com:&quot; xmlns:b=&quot;urn:schemas-microsoft-com:office:publisher&quot; xmlns:ss=&quot;urn:schemas-microsoft-com:office:spreadsheet&quot; xmlns:c=&quot;urn:schemas-microsoft-com:office:component:spreadsheet&quot; xmlns:odc=&quot;urn:schemas-microsoft-com:office:odc&quot; xmlns:oa=&quot;urn:schemas-microsoft-com:office:activation&quot; xmlns:html=&quot;http://www.w3.org/TR/REC-html40&quot; xmlns:q=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:rtc=&quot;http://microsoft.com/officenet/conferencing&quot; xmlns:D=&quot;DAV:&quot; xmlns:Repl=&quot;http://schemas.microsoft.com/repl/&quot; xmlns:mt=&quot;http://schemas.microsoft.com/sharepoint/soap/meetings/&quot; xmlns:x2=&quot;http://schemas.microsoft.com/office/excel/2003/xml&quot; xmlns:ppda=&quot;http://www.passport.com/NameSpace.xsd&quot; xmlns:ois=&quot;http://schemas.microsoft.com/sharepoint/soap/ois/&quot; xmlns:dir=&quot;http://schemas.microsoft.com/sharepoint/soap/directory/&quot; xmlns:ds=&quot;http://www.w3.org/2000/09/xmldsig#&quot; xmlns:dsp=&quot;http://schemas.microsoft.com/sharepoint/dsp&quot; xmlns:udc=&quot;http://schemas.microsoft.com/data/udc&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:sub=&quot;http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/&quot; xmlns:ec=&quot;http://www.w3.org/2001/04/xmlenc#&quot; xmlns:sp=&quot;http://schemas.microsoft.com/sharepoint/&quot; xmlns:sps=&quot;http://schemas.microsoft.com/sharepoint/soap/&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:udcs=&quot;http://schemas.microsoft.com/data/udc/soap&quot; xmlns:udcxf=&quot;http://schemas.microsoft.com/data/udc/xmlfile&quot; xmlns:udcp2p=&quot;http://schemas.microsoft.com/data/udc/parttopart&quot; xmlns:wf=&quot;http://schemas.microsoft.com/sharepoint/soap/workflow/&quot; xmlns:dsss=&quot;http://schemas.microsoft.com/office/2006/digsig-setup&quot; xmlns:dssi=&quot;http://schemas.microsoft.com/office/2006/digsig&quot; xmlns:mdssi=&quot;http://schemas.openxmlformats.org/package/2006/digital-signature&quot; xmlns:mver=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot; xmlns:m=&quot;http://schemas.microsoft.com/office/2004/12/omml&quot; xmlns:mrels=&quot;http://schemas.openxmlformats.org/package/2006/relationships&quot; xmlns:spwp=&quot;http://microsoft.com/sharepoint/webpartpages&quot; xmlns:ex12t=&quot;http://schemas.microsoft.com/exchange/services/2006/types&quot; xmlns:ex12m=&quot;http://schemas.microsoft.com/exchange/services/2006/messages&quot; xmlns:pptsl=&quot;http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/&quot; xmlns:spsl=&quot;http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService&quot; xmlns:st=&quot;&amp;#1;&quot; xmlns=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;

&lt;head&gt;

&lt;meta name=Generator content=&quot;Microsoft Word 12 (filtered medium)&quot;&gt;

&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext=&quot;edit&quot; spidmax=&quot;1026&quot; /&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext=&quot;edit&quot;&gt;
  &lt;o:idmap v:ext=&quot;edit&quot; data=&quot;1&quot; /&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;
&lt;/head&gt;

&lt;body lang=EN-US link=blue vlink=purple&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;Couple of options spring to mind:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in;
mso-list:l0 level1 lfo1'&gt;&lt;![if !supportLists]&gt;&lt;span style='font-size:11.0pt;
font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;&lt;span style='mso-list:Ignore'&gt;1.&lt;span style='font:7.0pt &quot;Times New Roman&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;Setup
evidence such that your assembly is given full trust.  I believe you had the
start of this in your other code where you were adding some strong name
evidence.  You should be able to search the web for normal .NET partial trust
scenarios for getting this right.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in;
mso-list:l0 level1 lfo1'&gt;&lt;![if !supportLists]&gt;&lt;span style='font-size:11.0pt;
font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;&lt;span style='mso-list:Ignore'&gt;2.&lt;span style='font:7.0pt &quot;Times New Roman&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;Setup
your object model so that it is a MarshalByRefObject which lives in another app
domain.  You can then expose the remote object to the partial trust app domain
via SetVariable.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;As far as including the DLL &amp;#8211; you can call LoadAssembly on the
ScriptRuntime and give it your assembly.  Then the user can import all of the
types from your DLL as they need them.  That won&amp;#8217;t work w/ #2 though. 
Alternately you can implement IAttributesCollection (or use a dynamic object in
2.6 although IAC is still supported) and create a scope w/ that as the backing storage. 
Then you&amp;#8217;ll be able to lazily resolve the members rather than eagerly
populating them - although you still need some code to lazily resolve them.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;] &lt;b&gt;On
Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Monday, November 09, 2009 7:49 AM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;Hi all again, I am still working with the same problem.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;Now I am creating the appDomain in this way by&amp;nbsp;recommendation&amp;nbsp;of
Dino:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;i&gt;&lt;span style='font-family:
&quot;Courier New&quot;'&gt;public static AppDomain CreateSandboxAppDomain()&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AppDomainSetup anAppDomainSetup = new
AppDomainSetup();&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;anAppDomainSetup.ApplicationBase =
AppDomain.CurrentDomain.BaseDirectory;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;anAppDomainSetup.ApplicationName =
&amp;quot;Testing&amp;quot;;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Evidence evidence = new Evidence();&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;evidence.AddHost(new
Zone(SecurityZone.Internet));&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AppDomain aSandboxedDomain =
AppDomain.CreateDomain(&amp;quot;Test Domain&amp;quot;,&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;evidence,&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp;anAppDomainSetup);&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return aSandboxedDomain;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;Now it is working but I have security restrictions over some
.dll that I want to have full trusted permissions. I am trying to do this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;string
aPythonScript =&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;@&amp;quot;aDocument
= CDLDocument()&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;aFigure =
TextBlock(1, 'type 1')&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;anotherFigure =
TextBlock(2, 'type 2')&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;aDocument.AddFigure(aFigure)&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;aDocument.AddFigure(anotherFigure)&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;aList =
aDocument.Figures&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;&amp;quot;;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;ScriptSource
source = engine.CreateScriptSourceFromString(aPythonScript);&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;ScriptScope scope
= engine.CreateScope();&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;scope.SetVariable(&amp;quot;CDLDocument&amp;quot;,
typeof(CDLDocument));&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;scope.SetVariable(&amp;quot;TextBlock&amp;quot;,
typeof(TextBlock));&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;i&gt;&lt;span style='font-family:&quot;Courier New&quot;'&gt;source.Execute(scope);&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;This is throwing
the&amp;nbsp;&amp;nbsp;System.Security.SecurityException.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;1. How can I give full trusted to a specific dll in an
AppDomain?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;2. How can I include a .dll to the scope instead of do a
SetVariable for each type which I have to manage from the python script?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;Thanks!&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;Nicolás&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='margin-bottom:12.0pt'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;2009/11/6 Nicolás Buttarelli &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;nbuttarelli@...&lt;/a&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='margin-bottom:12.0pt'&gt;Hi,&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;On Fri, Nov 6, 2009 at 1:07 AM, Dino Viehland &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dinov@...&lt;/a&gt;&amp;gt;
wrote:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;So you&amp;#8217;ve run this as a standalone
program and it&amp;#8217;s failing?&amp;nbsp; In the standalone app are all of the IronPython
and DLR DLLs present (IronPython.dll, IronPython.modules.dll,
Microsoft.Scripting.Core.dll, Microsoft.Scripting.dll, Microsoft.Dynamic.dll
and Micrsoft.Scripting.Extensionattribute.dll)?&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;Yes I have all this dlls present. &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in'&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;A slightly modified version of this,
dropping the strong name, works just fine for me:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;using System;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;using Microsoft.Scripting;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;using Microsoft.Scripting.Hosting;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;using IronPython.Hosting;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;using System.Security;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;using System.Security.Permissions;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;class Test {&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void
Main(string[] args) {&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
PermissionSet aRestrictedPermissionSet = new
PermissionSet(PermissionState.None);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
aRestrictedPermissionSet.AddPermission(new
SecurityPermission(SecurityPermissionFlag.Execution));&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
AppDomainSetup domaininfo = new AppDomainSetup();&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
domaininfo.ApplicationBase = System.Environment.CurrentDirectory;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
AppDomain aSandboxedDomain = AppDomain.CreateDomain(&amp;quot;Sandboxed
Domain&amp;quot;,&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
AppDomain.CurrentDomain.Evidence,&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
domaininfo,&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
aRestrictedPermissionSet);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
ScriptEngine engine = Python.CreateEngine(aSandboxedDomain);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
ScriptSource source = engine.CreateScriptSourceFromString(&amp;quot;2+2&amp;quot;);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
ScriptScope scope = engine.CreateScope();&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Console.WriteLine(source.Execute(scope));&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;}&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/blockquote&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;br&gt;
Great, I will try this after university. Thanks! &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in'&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;Compile with:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;csc test.cs
/r:Microsoft.Scripting.Core.dll /r:Microsoft.Scripting.dll /r:IronPython.dll&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;And run and it prints 4.&amp;nbsp; Does that
not work for you?&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;We also have a different way we do this
in our test suite which also works:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
AppDomainSetup info = new AppDomainSetup();&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
info.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
info.ApplicationName = &amp;quot;Test&amp;quot;;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Evidence evidence = new Evidence();&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
evidence.AddHost(new Zone(SecurityZone.Internet));&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
AppDomain newDomain = AppDomain.CreateDomain(&amp;quot;test&amp;quot;, evidence, info);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
// create runtime in partial trust...&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
ScriptRuntime runtime = Python.CreateRuntime(newDomain);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
// get the Python engine...&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
ScriptEngine engine = runtime.GetEngine(&amp;quot;py&amp;quot;);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/blockquote&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;br&gt;
This make sense too, I will try it. Thanks again. &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in'&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div style='border:none;border-left:solid windowtext 1.5pt;padding:0in 0in 0in 4.0pt;
border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color blue'&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0in 0in 0in;
border-color:-moz-use-text-color -moz-use-text-color'&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Thursday, November 05, 2009 11:18 AM&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Again,
thanks everyone for your help.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;But..
I bring bad news. This is still not working and it doesn't depend on the Test
environment.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;I
create another proyect, a Form project, with one button which executes the
following code:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;//
Creating the permission set to grant other assemblies&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;PermissionSet
aRestrictedPermissionSet = new PermissionSet(PermissionState.None);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;aRestrictedPermissionSet.AddPermission(new
SecurityPermission(SecurityPermissionFlag.Execution));&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;AppDomainSetup
domaininfo = new AppDomainSetup();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;domaininfo.ApplicationBase
= System.Environment.CurrentDirectory;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;List&amp;lt;StrongName&amp;gt;
strongNameList = new List&amp;lt;StrongName&amp;gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;strongNameList.Add(CreateStrongName(Assembly.GetExecutingAssembly()));&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;AppDomain
aSandboxedDomain = AppDomain.CreateDomain(&amp;quot;Sandboxed Domain&amp;quot;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp;AppDomain.CurrentDomain.Evidence,&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp;domaininfo,&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp;aRestrictedPermissionSet,&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp;strongNameList.ToArray&amp;lt;StrongName&amp;gt;());&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;ScriptEngine
engine = Python.CreateEngine(aSandboxedDomain);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;ScriptSource
source = engine.CreateScriptSourceFromString(pythonScript);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;ScriptScope
scope = engine.CreateScope();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;source.Execute(scope);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;It
throws this error:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Type
is not resolved for member
'Microsoft.Scripting.Hosting.ScriptRuntimeSetup,Microsoft.Scripting,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;I
used the&amp;nbsp;&lt;span style='font-size:11.5pt;color:#1F497D'&gt;fuslogvw&amp;nbsp;&lt;/span&gt;&lt;span style='color:black'&gt;application to see if the Microsoft.Scripting is loaded, an
it is.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;What
seems strange for me is that anyone has tried this before. I hope to find some
more help here.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Regards,&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Nicolas&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;On
Wed, Nov 4, 2009 at 7:36 PM, Shri Borde &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Shri.Borde@...&lt;/a&gt;&amp;gt;
wrote:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&lt;a href=&quot;http://www.dev102.com/2008/03/22/3-ways-to-run-nunit-from-visual-studio/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.dev102.com/2008/03/22/3-ways-to-run-nunit-from-visual-studio/&lt;/a&gt;
has some info about test projects and appbase problems.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;You can also use fuslogvw (&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/e74a18c4%28VS.71%29.aspx%29&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://msdn.microsoft.com/en-us/library/e74a18c4(VS.71).aspx)&lt;/a&gt;
to see why Microsoft.Scripting.dll is failing to load.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0in 0in 0in;
border-color:-moz-use-text-color -moz-use-text-color'&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Dino Viehland&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Tuesday, November 03, 2009 1:52 PM&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net application&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;Test projects are weird and somehow you
don&amp;#8217;t end up inheriting the application base.&amp;nbsp; This seems to work though:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AppDomainSetup
setup = new AppDomainSetup();&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
setup.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
AppDomain aSandboxedDomain = AppDomain.CreateDomain(&amp;quot;Sandboxed
Domain&amp;quot;, null, setup);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
ScriptEngine engine = Python.CreateEngine(aSandboxedDomain);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
ScriptSource source = engine.CreateScriptSourceFromString(&amp;quot;2+2&amp;quot;);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
ScriptScope scope = engine.CreateScope();&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Console.WriteLine(source.Execute(scope));&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div style='border:none;border-left:solid windowtext 1.5pt;padding:0in 0in 0in 4.0pt;
border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color blue'&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0in 0in 0in;
border-color:-moz-use-text-color -moz-use-text-color'&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Tuesday, November 03, 2009 1:30 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;I
have create a new &amp;quot;Test Project&amp;quot; and an Unit Test class in order to
test the following code inside:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;AppDomain
aSandboxedDomain = AppDomain.CreateDomain(&amp;quot;Sandboxed Domain&amp;quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;ScriptEngine
engine = Python.CreateEngine(aSandboxedDomain);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;ScriptSource
source = engine.CreateScriptSourceFromString(pythonScript);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;ScriptScope
scope = engine.CreateScope();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;source.Execute(scope);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;I
have add the references:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;-
IronPython&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;-
Microsoft.Scripting&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;-
Microsoft.ScriptingCore&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;But
it still not working and&amp;nbsp;throwing&amp;nbsp;the
same&amp;nbsp;System.Runtime.Serialization.SerializationException: Type is not
resolved for member
'Microsoft.Scripting.Hosting.ScriptRuntimeSetup,Microsoft.Scripting.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Any
ideas?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;2009/11/3
Nicolás Buttarelli &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;nbuttarelli@...&lt;/a&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Thanks
Shri, I will try.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;In
addition, I found this open issue:&amp;nbsp;&lt;a href=&quot;http://dlr.codeplex.com/WorkItem/View.aspx?WorkItemId=2816&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://dlr.codeplex.com/WorkItem/View.aspx?WorkItemId=2816&lt;/a&gt;.
I think that it is related.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;On
Tue, Nov 3, 2009 at 9:29 PM, Shri Borde &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Shri.Borde@...&lt;/a&gt;&amp;gt;
wrote:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;I think this happens if the new
appdomain cannot load the required assembly. By default, the new appdomain
should inherit its BaseDirectory property from the creating domain and should
be able to load Microsoft.Scripting.dll. Is your exe and all the dlls in the
same folder? If not, can you try to put all assemblies in the same folder (or
in the GAC) to see if it works? If that works, you can then figure out how to
configure the new appdomain such that it can load Microsoft.Scripting.dll.
There may be some setting in AppDomainSetup, or you could hook the
AssemblyResolve event&amp;#8230;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div style='border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0in 0in 0in;
border-color:-moz-use-text-color -moz-use-text-color'&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Tuesday, November 03, 2009 12:08 PM&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Hi
again, thanks for your clear response.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;I
was trying to do what you&amp;nbsp;proposed&amp;nbsp;but it is not working. I am
receiving an exception:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'&gt;&lt;i&gt;Test
method CadworX3WCFRestTest.IronPython.SafeScriptExecutionTest.writingAFileTest
threw exception: &amp;nbsp;System.Runtime.Serialization.SerializationException:
Type is not resolved for member
'Microsoft.Scripting.Hosting.ScriptRuntimeSetup,Microsoft.Scripting,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'..&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;I
tried to find a solution but I couldn't. This is the minimal code that I am
running to get this exception (I have removed all the security stuff but
apparently that does not resolve the problem):&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;i&gt;AppDomain
aSandboxedDomain = AppDomain.CreateDomain(&amp;quot;Sandboxed Domain&amp;quot;);&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;i&gt;ScriptEngine
engine = Python.CreateEngine(aSandboxedDomain);&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;i&gt;ScriptSource
source = engine.CreateScriptSourceFromString(pythonScript);&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;i&gt;SriptScope
scope = engine.CreateScope();&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;i&gt;source.Execute(scope);&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;The
exception is&amp;nbsp;thronged in this line:&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;i&gt;ScriptEngine
engine = Python.CreateEngine(aSandboxedDomain);&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Do
you have any idea which could be the problem?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Thanks
again,&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Nicolas&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;On
Mon, Nov 2, 2009 at 10:25 PM, Dino Viehland &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dinov@...&lt;/a&gt;&amp;gt;
wrote:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;Assuming the app domain is setup
properly then there&amp;#8217;s no way for the Python code to elevate permissions (modulo
CLR security bugs which are few and far between).&amp;nbsp; This is because
IronPython its self is 100% security transparent and does not affect any
security decisions or assert any form of trust &amp;#8211; so it&amp;#8217;s all up to the CLR to
limit permissions.&amp;nbsp; So for example while you can access the file object,
or import ctypes, or call various other Python APIs which would require trust
you&amp;#8217;ll get a security exception from the CLR when you don&amp;#8217;t have permissions to
do something.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;For more complex scenarios you might
also have an object model which you expose to the application and inject in via
its scope.&amp;nbsp; Once you&amp;#8217;ve done that you&amp;#8217;ll want to make sure that the object
model is also secure.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div style='border:none;border-left:solid windowtext 1.5pt;padding:0in 0in 0in 4.0pt;
border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color blue'&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0in 0in 0in;
border-color:-moz-use-text-color -moz-use-text-color'&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=17&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Monday, November 02, 2009 1:20 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Thanks
for your response.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;But
what happens with the python code? Does not exist a&amp;nbsp;way to write some
scripts that can do some damage to my app, the server, the database, etc?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Thanks
again,&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Nicolas&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;On
Mon, Nov 2, 2009 at 9:41 PM, Dino Viehland &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=18&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dinov@...&lt;/a&gt;&amp;gt;
wrote:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;After creating your app domain you can
do:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;ScriptEngine engine =
Python.CreateEngine(someAppDomain);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;And then the rest of your code should
work as it&amp;#8217;s written.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div style='border:none;border-left:solid windowtext 1.5pt;padding:0in 0in 0in 4.0pt;
border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color blue'&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0in 0in 0in;
border-color:-moz-use-text-color -moz-use-text-color'&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=19&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=20&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Monday, November 02, 2009 12:39 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; [IronPython] Safe execution of python scripts on my .net
application&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;Sorry, I don't know if my previous message have
arrived. So, here it is:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;Hello all,&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;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.&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;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.&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;In .net I can do this using the AppDoman and setting
the permission set.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#333333'&gt;AppDomain.CreateDomain(&amp;nbsp;&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;string&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#333333'&gt;&amp;nbsp;friendlyName,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Evidence
securityInfo,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AppDomainSetup
info,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PermissionSet
grantSet,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;params&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#333333'&gt;&amp;nbsp;StrongName[]
fullTrustAssemblies);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;Is there a way to do the same with my python
scripts?&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;I am running them using this:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;ScriptEngine engine = Python.CreateEngine();&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;ScriptSource source =
engine.CreateScriptSourceFromString(scriptAsString);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;ScriptScope scope = engine.CreateScope();&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;source.Execute(scope);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;Thanks in advance.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;Nicolas&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=22&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=23&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=24&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=25&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='margin-bottom:12.0pt'&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=26&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/blockquote&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271561&amp;i=27&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Safe-execution-of-python-scripts-on-my-.net-application-tp26170322p26271561.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26269719</id>
	<title>IronPython 2.6 CodePlex Source Update</title>
	<published>2009-11-09T08:53:53Z</published>
	<updated>2009-11-09T08:53:53Z</updated>
	<author>
		<name>merllab</name>
	</author>
	<content type="html">This is an automated email letting you know that sources 
&lt;br&gt;have recently been pushed out. &amp;nbsp;You can download these newer 
&lt;br&gt;sources directly from &lt;a href=&quot;http://ironpython.codeplex.com/SourceControl/changeset/view/61249&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ironpython.codeplex.com/SourceControl/changeset/view/61249&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;ADDED SOURCES
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/ILoopStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/AstMethods.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/SerializedScopeStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/CollectableCompilationMode.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/LookupCompilationMode.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/ToDiskCompilationMode.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/UncollectableCompilationMode.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/UncollectableCompilationMode.Generated.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Scripts/generate_UncollectableCompilationMode.py
&lt;br&gt;&lt;br&gt;DELETED SOURCES
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/ArrayGlobalAllocator.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/DictionaryGlobalAllocator.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/AstGenerator.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/SharedGlobalAllocator.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/SharedGlobalAllocator.Generated.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/SavableGlobalAllocator.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Scripts/generate_SharedGlobalAllocator.py
&lt;br&gt;&lt;br&gt;MODIFIED SOURCES
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/ILoopStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/AstMethods.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/BinaryExpression.Generated.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/PythonNameBinder.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/PythonAst.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/PrintStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/ParenthesisExpression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/Parameter.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/OrExpression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/Node.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/NameExpression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/MemberExpression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/ListExpression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/ListComprehensionIf.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/ListComprehensionFor.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/ListComprehension.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/LambdaExpression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/IndexExpression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/ImportStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/IfStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/GlobalStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/GeneratorExpression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/FunctionDefinition.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/FromImportStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/ForStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/ExpressionStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/Expression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/ExecStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/ErrorExpression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/EmptyStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/DictionaryExpression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/DelStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/ContinueStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/ConstantExpression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/ConditionalExpression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/ClassDefinition.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/CallExpression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/BreakStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/BinaryExpression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/BackQuoteExpression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/SerializedScopeStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/CollectableCompilationMode.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/LookupCompilationMode.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/ClosureExpression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/CompilationMode.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/ClosureInfo.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/OnDiskScriptCode.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/PythonCompilerOptions.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/VariableKind.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/YieldExpression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/PythonVariable.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/PythonReference.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/WithStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/WhileStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/UnaryExpression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/TupleExpression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/TryStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/SuiteStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/Statement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/SliceExpression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/SequenceExpression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/ScopeStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/ReturnStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/RaiseStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/AugmentedAssignStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/AssignmentStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/AssertStatement.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/Arg.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/AndExpression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Parser.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/ToDiskCompilationMode.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/UncollectableCompilationMode.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/UncollectableCompilationMode.Generated.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/RunnableScriptCode.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Modules/Builtin.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/PythonScriptCode.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/PythonGlobalVariableExpression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/PythonGlobal.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/RuntimeScriptCode.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaPythonType.Calls.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/BindingHelpers.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Compiler/Tokenizer.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/IronPython.csproj
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/Utils/CollectionUtils.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Runtime/CodeContext.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Runtime/FunctionCode.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonFunction.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/PythonOps.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonContext.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/IronPython/Runtime/Importer.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Scripts/generate_UncollectableCompilationMode.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Debugging/DebuggableLambdaBuilder.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Ast/Expression.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Scripts/generate_walker.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/test_function.py
&lt;br&gt;&lt;br&gt;CHECKIN COMMENTS
&lt;br&gt;--------------------------------------------------------------------------------
&lt;br&gt;Changeset Id: 1258596
&lt;br&gt;Date: 11/6/2009 2:16:40 PM
&lt;br&gt;&lt;br&gt;(sborde) Adds support to declare intefaces in the clrtype sample
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;(Shelveset: clrtype;REDMOND\sborde | SNAP CheckinId: 9759)
&lt;br&gt;--------------------------------------------------------------------------------
&lt;br&gt;Changeset Id: 1258456
&lt;br&gt;Date: 11/6/2009 1:18:39 PM
&lt;br&gt;&lt;br&gt;(dinov) Improves import time and working set by making IronPython ASTs reducible DLR ASTs and delaying reduction of Python functions until they are run the first time.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Before	After	% change
&lt;br&gt;Big import - no ngen	7646.252731	5129.492	-32.91496228
&lt;br&gt;Big import Private WS - no ngen	58188	42560	-26.85777136
&lt;br&gt;Big import Working Set - no ngen	74448	62800	-15.6458199
&lt;br&gt;Hello world - no ngen	3764.7576	3600.676	-4.358357627
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;Big import	5696.948	3028.675	-46.83689407
&lt;br&gt;Big import Private WS	55124	40260	-26.96466149
&lt;br&gt;Big import Working Set	78912	59856	-24.14841849
&lt;br&gt;Hello world	933.3606	844.5354	-9.51670769
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;(Shelveset: NewAstsFinal4;REDMOND\dinov | SNAP CheckinId: 9767)
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26269719&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/IronPython-2.6-CodePlex-Source-Update-tp26269719p26269719.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26268626</id>
	<title>Re: Safe execution of python scripts on my .net application</title>
	<published>2009-11-09T07:48:32Z</published>
	<updated>2009-11-09T07:48:32Z</updated>
	<author>
		<name>Nicolás Buttarelli</name>
	</author>
	<content type="html">Hi all again, I am still working with the same problem.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Now I am creating the appDomain in this way by recommendation of Dino:&lt;/div&gt;&lt;div&gt;&lt;div&gt;        &lt;/div&gt;&lt;div&gt;        &lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;public static AppDomain CreateSandboxAppDomain()&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;        {&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;            AppDomainSetup anAppDomainSetup = new AppDomainSetup();&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;            anAppDomainSetup.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory;&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;            anAppDomainSetup.ApplicationName = &amp;quot;Testing&amp;quot;;&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;            Evidence evidence = new Evidence();&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;            evidence.AddHost(new Zone(SecurityZone.Internet));&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;            &lt;/font&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;            AppDomain aSandboxedDomain = AppDomain.CreateDomain(&amp;quot;Test Domain&amp;quot;, &lt;/font&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;                                                                evidence, &lt;/font&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;                                                                anAppDomainSetup);&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;            &lt;/font&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;            return aSandboxedDomain;&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;        }&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Now it is working but I have security restrictions over some .dll that I want to have full trusted permissions. I am trying to do this:&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;string aPythonScript =&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;@&amp;quot;aDocument = CDLDocument()&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;aFigure = TextBlock(1, &amp;#39;type 1&amp;#39;)&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;anotherFigure = TextBlock(2, &amp;#39;type 2&amp;#39;)&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;aDocument.AddFigure(aFigure)&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;aDocument.AddFigure(anotherFigure)&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;aList = aDocument.Figures&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;&amp;quot;;&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;&lt;br&gt;&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;ScriptSource source = engine.CreateScriptSourceFromString(aPythonScript);&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;ScriptScope scope = engine.CreateScope();&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;            &lt;/font&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;scope.SetVariable(&amp;quot;CDLDocument&amp;quot;, typeof(CDLDocument));&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;scope.SetVariable(&amp;quot;TextBlock&amp;quot;, typeof(TextBlock));&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;&lt;i&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;&amp;#39;courier new&amp;#39;, monospace&quot;&gt;source.Execute(scope);&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;This is throwing the  System.Security.SecurityException.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;1. How can I give full trusted to a specific dll in an AppDomain?&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;2. How can I include a .dll to the scope instead of do a SetVariable for each type which I have to manage from the python script?&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thanks!&lt;/div&gt;&lt;div&gt;Nicolás&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;
&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/6 Nicolás Buttarelli &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;nbuttarelli@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;
Hi,&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;&lt;div class=&quot;im&quot;&gt;On Fri, Nov 6, 2009 at 1:07 AM, Dino Viehland &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dinov@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex&quot;&gt;











&lt;div link=&quot;blue&quot; vlink=&quot;purple&quot; lang=&quot;EN-US&quot;&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;So you’ve run this as a standalone program and it’s failing?  In
the standalone app are all of the IronPython and DLR DLLs present
(IronPython.dll, IronPython.modules.dll, Microsoft.Scripting.Core.dll,
Microsoft.Scripting.dll, Microsoft.Dynamic.dll and Micrsoft.Scripting.Extensionattribute.dll)? 
&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;Yes I have all this dlls present. &lt;br&gt;&lt;/div&gt;&lt;div class=&quot;im&quot;&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex&quot;&gt;
&lt;div link=&quot;blue&quot; vlink=&quot;purple&quot; lang=&quot;EN-US&quot;&gt;
&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;A slightly modified version of this, dropping the strong name,
works just fine for me:&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;using System;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;using Microsoft.Scripting;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;using Microsoft.Scripting.Hosting;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;using IronPython.Hosting;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;using System.Security;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;using System.Security.Permissions;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;class Test {&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;    public static void Main(string[] args) {&lt;/span&gt;&lt;/p&gt;&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;    &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;        PermissionSet aRestrictedPermissionSet = new
PermissionSet(PermissionState.None);&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;        aRestrictedPermissionSet.AddPermission(new
SecurityPermission(SecurityPermissionFlag.Execution));&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;        AppDomainSetup domaininfo = new AppDomainSetup();&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;        domaininfo.ApplicationBase =
System.Environment.CurrentDirectory;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;        AppDomain aSandboxedDomain =
AppDomain.CreateDomain(&amp;quot;Sandboxed Domain&amp;quot;,&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;                  AppDomain.CurrentDomain.Evidence,&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;                  domaininfo,&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;                  aRestrictedPermissionSet);&lt;/span&gt;&lt;/p&gt;&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;        ScriptEngine engine =
Python.CreateEngine(aSandboxedDomain);&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;        ScriptSource source =
engine.CreateScriptSourceFromString(&amp;quot;2+2&amp;quot;);&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;        ScriptScope scope = engine.CreateScope();&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;        Console.WriteLine(source.Execute(scope));&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;    }&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;}&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;Great, I will try this after university. Thanks! &lt;br&gt;&lt;/div&gt;&lt;div class=&quot;im&quot;&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex&quot;&gt;

&lt;div link=&quot;blue&quot; vlink=&quot;purple&quot; lang=&quot;EN-US&quot;&gt;&lt;div&gt;&lt;div&gt;

&lt;/div&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;Compile with:&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;csc test.cs /r:Microsoft.Scripting.Core.dll
/r:Microsoft.Scripting.dll /r:IronPython.dll&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;And run and it prints 4.  Does that not work for you?&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;We also have a different way we do this in our test suite which
also works:&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;            AppDomainSetup info = new AppDomainSetup();&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;            info.ApplicationBase =
AppDomain.CurrentDomain.BaseDirectory;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;            info.ApplicationName = &amp;quot;Test&amp;quot;;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;            Evidence evidence = new Evidence();&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;            evidence.AddHost(new Zone(SecurityZone.Internet));&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;            AppDomain newDomain =
AppDomain.CreateDomain(&amp;quot;test&amp;quot;, evidence, info);&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;            &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;            // create runtime in partial trust...&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;            ScriptRuntime runtime = Python.CreateRuntime(newDomain);&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;            // get the Python engine...&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;            ScriptEngine engine =
runtime.GetEngine(&amp;quot;py&amp;quot;);&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;This make sense too, I will try it. Thanks again. &lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex&quot;&gt;

&lt;div link=&quot;blue&quot; vlink=&quot;purple&quot; lang=&quot;EN-US&quot;&gt;&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;div style=&quot;border-style:none none none solid;border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color blue;border-width:medium medium medium 1.5pt;padding:0in 0in 0in 4pt&quot;&gt;

&lt;div&gt;

&lt;div style=&quot;border-style:solid none none;border-color:rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color;border-width:1pt medium medium;padding:3pt 0in 0in&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size:10pt&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;] &lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás
Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Thursday, November 05, 2009 11:18 AM&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Again, thanks everyone for your help.&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;But.. I bring bad news. This is still not working and it
doesn&amp;#39;t depend on the Test environment.&lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;I create another proyect, a Form project, with one button
which executes the following code:&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; // Creating the permission set to grant other
assemblies&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;PermissionSet aRestrictedPermissionSet = new
PermissionSet(PermissionState.None);&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;aRestrictedPermissionSet.AddPermission(new
SecurityPermission(SecurityPermissionFlag.Execution));&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;AppDomainSetup domaininfo = new AppDomainSetup();&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;domaininfo.ApplicationBase =
System.Environment.CurrentDirectory;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;List&amp;lt;StrongName&amp;gt; strongNameList = new
List&amp;lt;StrongName&amp;gt;();&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;strongNameList.Add(CreateStrongName(Assembly.GetExecutingAssembly()));&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;            &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;AppDomain aSandboxedDomain =
AppDomain.CreateDomain(&amp;quot;Sandboxed Domain&amp;quot;,&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;              
                     
                     
                     
         AppDomain.CurrentDomain.Evidence,&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;              
                     
                     
                   
           domaininfo,&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;              
                     
                     
                   
           aRestrictedPermissionSet,&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;              
                     
                     
                   
           strongNameList.ToArray&amp;lt;StrongName&amp;gt;());&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;ScriptEngine engine = Python.CreateEngine(aSandboxedDomain);&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;ScriptSource source =
engine.CreateScriptSourceFromString(pythonScript);&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;ScriptScope scope = engine.CreateScope();&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;source.Execute(scope);&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;It throws this error:&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Type is not resolved for member
&amp;#39;Microsoft.Scripting.Hosting.ScriptRuntimeSetup,Microsoft.Scripting,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&amp;#39;.&lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;I used the &lt;span&gt;&lt;span style=&quot;font-size:11.5pt;color:rgb(31, 73, 125)&quot;&gt;fuslogvw &lt;/span&gt;&lt;span style=&quot;color:black&quot;&gt;application to see if the Microsoft.Scripting is loaded, an
it is.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;What seems strange for me is that anyone has tried this
before. I hope to find some more help here.&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Regards,&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Nicolas&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;On Wed, Nov 4, 2009 at 7:36 PM, Shri Borde &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Shri.Borde@...&lt;/a&gt;&amp;gt; wrote:&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;&lt;a href=&quot;http://www.dev102.com/2008/03/22/3-ways-to-run-nunit-from-visual-studio/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.dev102.com/2008/03/22/3-ways-to-run-nunit-from-visual-studio/&lt;/a&gt;
has some info about test projects and appbase problems.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;You can also use fuslogvw (&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/e74a18c4%28VS.71%29.aspx%29&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://msdn.microsoft.com/en-us/library/e74a18c4(VS.71).aspx)&lt;/a&gt;
to see why Microsoft.Scripting.dll is failing to load.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style=&quot;border-style:solid none none;border-color:rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color;border-width:1pt medium medium;padding:3pt 0in 0in&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size:10pt&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Dino Viehland&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Tuesday, November 03, 2009 1:52 PM&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;Test projects are weird and somehow you
don’t end up inheriting the application base.  This seems to work though:&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; 
          AppDomainSetup
setup = new AppDomainSetup();&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;           
setup.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;           
AppDomain aSandboxedDomain = AppDomain.CreateDomain(&amp;quot;Sandboxed
Domain&amp;quot;, null, setup);&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;           
ScriptEngine engine = Python.CreateEngine(aSandboxedDomain);&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;           
ScriptSource source = engine.CreateScriptSourceFromString(&amp;quot;2+2&amp;quot;);&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;           
ScriptScope scope = engine.CreateScope();&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;           
Console.WriteLine(source.Execute(scope));&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;div style=&quot;border-style:none none none solid;border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color blue;border-width:medium medium medium 1.5pt;padding:0in 0in 0in 4pt&quot;&gt;

&lt;div&gt;

&lt;div style=&quot;border-style:solid none none;border-color:rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color;border-width:1pt medium medium;padding:3pt 0in 0in&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size:10pt&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Tuesday, November 03, 2009 1:30 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;I
have create a new &amp;quot;Test Project&amp;quot; and an Unit Test class in order to
test the following code inside:&lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;AppDomain
aSandboxedDomain = AppDomain.CreateDomain(&amp;quot;Sandboxed Domain&amp;quot;);&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;ScriptEngine
engine = Python.CreateEngine(aSandboxedDomain);&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;ScriptSource
source = engine.CreateScriptSourceFromString(pythonScript);&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;ScriptScope
scope = engine.CreateScope();&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;source.Execute(scope);&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;I
have add the references:&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;-
IronPython&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;-
Microsoft.Scripting&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;-
Microsoft.ScriptingCore&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;But
it still not working and throwing the
same System.Runtime.Serialization.SerializationException: Type is not
resolved for member &amp;#39;Microsoft.Scripting.Hosting.ScriptRuntimeSetup,Microsoft.Scripting.&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Any
ideas?&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;2009/11/3
Nicolás Buttarelli &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;nbuttarelli@...&lt;/a&gt;&amp;gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Thanks
Shri, I will try.&lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;In
addition, I found this open issue: &lt;a href=&quot;http://dlr.codeplex.com/WorkItem/View.aspx?WorkItemId=2816&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://dlr.codeplex.com/WorkItem/View.aspx?WorkItemId=2816&lt;/a&gt;.
I think that it is related.&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom:12pt&quot;&gt; &lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;On
Tue, Nov 3, 2009 at 9:29 PM, Shri Borde &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Shri.Borde@...&lt;/a&gt;&amp;gt;
wrote:&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;I think this happens if the new
appdomain cannot load the required assembly. By default, the new appdomain
should inherit its BaseDirectory property from the creating domain and should
be able to load Microsoft.Scripting.dll. Is your exe and all the dlls in the
same folder? If not, can you try to put all assemblies in the same folder (or
in the GAC) to see if it works? If that works, you can then figure out how to
configure the new appdomain such that it can load Microsoft.Scripting.dll.
There may be some setting in AppDomainSetup, or you could hook the
AssemblyResolve event…&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;div style=&quot;border-style:solid none none;border-color:rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color;border-width:1pt medium medium;padding:3pt 0in 0in&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size:10pt&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Tuesday, November 03, 2009 12:08 PM&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Hi
again, thanks for your clear response.&lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;I
was trying to do what you proposed but it is not working. I am
receiving an exception:&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom:12pt&quot;&gt;&lt;i&gt;Test
method CadworX3WCFRestTest.IronPython.SafeScriptExecutionTest.writingAFileTest
threw exception:  System.Runtime.Serialization.SerializationException:
Type is not resolved for member
&amp;#39;Microsoft.Scripting.Hosting.ScriptRuntimeSetup,Microsoft.Scripting,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&amp;#39;..&lt;/i&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;I
tried to find a solution but I couldn&amp;#39;t. This is the minimal code that I am
running to get this exception (I have removed all the security stuff but
apparently that does not resolve the problem):&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;i&gt;AppDomain
aSandboxedDomain = AppDomain.CreateDomain(&amp;quot;Sandboxed Domain&amp;quot;);&lt;/i&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;i&gt;ScriptEngine
engine = Python.CreateEngine(aSandboxedDomain);&lt;/i&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;i&gt;ScriptSource
source = engine.CreateScriptSourceFromString(pythonScript);&lt;/i&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;i&gt;SriptScope
scope = engine.CreateScope();&lt;/i&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;i&gt;source.Execute(scope);&lt;/i&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;The
exception is thronged in this line: &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;i&gt;ScriptEngine
engine = Python.CreateEngine(aSandboxedDomain);&lt;/i&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Do
you have any idea which could be the problem?&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Thanks
again,&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Nicolas&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;On
Mon, Nov 2, 2009 at 10:25 PM, Dino Viehland &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dinov@...&lt;/a&gt;&amp;gt;
wrote:&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;Assuming the app domain is setup
properly then there’s no way for the Python code to elevate permissions (modulo
CLR security bugs which are few and far between).  This is because IronPython
its self is 100% security transparent and does not affect any security
decisions or assert any form of trust – so it’s all up to the CLR to limit
permissions.  So for example while you can access the file object, or
import ctypes, or call various other Python APIs which would require trust
you’ll get a security exception from the CLR when you don’t have permissions to
do something.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;For more complex scenarios you might
also have an object model which you expose to the application and inject in via
its scope.  Once you’ve done that you’ll want to make sure that the object
model is also secure.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;div style=&quot;border-style:none none none solid;border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color blue;border-width:medium medium medium 1.5pt;padding:0in 0in 0in 4pt&quot;&gt;

&lt;div&gt;

&lt;div style=&quot;border-style:solid none none;border-color:rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color;border-width:1pt medium medium;padding:3pt 0in 0in&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size:10pt&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Monday, November 02, 2009 1:20 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Thanks
for your response.&lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;But
what happens with the python code? Does not exist a way to write some
scripts that can do some damage to my app, the server, the database, etc?&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Thanks
again,&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Nicolas&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;On
Mon, Nov 2, 2009 at 9:41 PM, Dino Viehland &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dinov@...&lt;/a&gt;&amp;gt;
wrote:&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;After creating your app domain you can
do:&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;ScriptEngine engine =
Python.CreateEngine(someAppDomain);&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt;And then the rest of your code should work
as it’s written.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11pt;color:rgb(31, 73, 125)&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;div style=&quot;border-style:none none none solid;border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color blue;border-width:medium medium medium 1.5pt;padding:0in 0in 0in 4pt&quot;&gt;

&lt;div&gt;

&lt;div style=&quot;border-style:solid none none;border-color:rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color;border-width:1pt medium medium;padding:3pt 0in 0in&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size:10pt&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=17&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=18&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Monday, November 02, 2009 12:39 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=19&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; [IronPython] Safe execution of python scripts on my .net
application&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;Sorry, I don&amp;#39;t know if my previous message have
arrived. So, here it is:&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;Hello all,&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;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. &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;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. &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;In .net I can do this using the AppDoman and setting
the permission set.&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt;font-family:&amp;quot;Courier New&amp;quot;;color:rgb(51, 51, 51)&quot;&gt;AppDomain.CreateDomain( &lt;/span&gt;&lt;span style=&quot;font-size:10pt;font-family:&amp;quot;Courier New&amp;quot;;color:blue&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;font-size:10pt;font-family:&amp;quot;Courier New&amp;quot;;color:rgb(51, 51, 51)&quot;&gt; friendlyName,&lt;br&gt;


                        Evidence
securityInfo,&lt;br&gt;
                        AppDomainSetup
info,&lt;br&gt;
                        PermissionSet
grantSet,&lt;br&gt;
                        &lt;/span&gt;&lt;span style=&quot;font-size:10pt;font-family:&amp;quot;Courier New&amp;quot;;color:blue&quot;&gt;params&lt;/span&gt;&lt;span style=&quot;font-size:10pt;font-family:&amp;quot;Courier New&amp;quot;;color:rgb(51, 51, 51)&quot;&gt; StrongName[]
fullTrustAssemblies);&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;Is there a way to do the same with my python
scripts? &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;I am running them using this:&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;ScriptEngine engine = Python.CreateEngine();&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;ScriptSource source = engine.CreateScriptSourceFromString(scriptAsString);&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;ScriptScope scope = engine.CreateScope();&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;source.Execute(scope);&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;Thanks in advance.&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;Nicolas&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom:12pt&quot;&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=20&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom:12pt&quot;&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom:12pt&quot;&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=22&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom:12pt&quot;&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=23&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;


&lt;br&gt;_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=24&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268626&amp;i=25&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Safe-execution-of-python-scripts-on-my-.net-application-tp26170322p26268626.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26263790</id>
	<title>Re: IronPython 2.6 RC 1 Release Hidden</title>
	<published>2009-11-09T02:04:40Z</published>
	<updated>2009-11-09T02:04:40Z</updated>
	<author>
		<name>Michael Foord-5</name>
	</author>
	<content type="html">Michael Foord wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Jimmy Schementi wrote:
&lt;br&gt;&amp;gt;&amp;gt; I agree, but I think the desire it to keep that &amp;quot;Releases&amp;quot; list 
&lt;br&gt;&amp;gt;&amp;gt; clean. Otherwise it would have every release ever in there. It's a 
&lt;br&gt;&amp;gt;&amp;gt; CodePlex limitation that there is no way to hide those releases from 
&lt;br&gt;&amp;gt;&amp;gt; that list, while still keeping the links active.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I understand the motivation, but making releases that people / 
&lt;br&gt;&amp;gt; projects may have depended on is an unacceptable cost in my opinion.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;As an addendum, if you need them many of the hidden releases are still 
&lt;br&gt;available from the downloads page on the IronPython Cookbook:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://www.ironpython.info/index.php/Downloads&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ironpython.info/index.php/Downloads&lt;/a&gt;&lt;br&gt;&lt;br&gt;All the best,
&lt;br&gt;&lt;br&gt;Michael Foord
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; All the best,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Michael
&lt;br&gt;&amp;gt;&amp;gt; Here are all the hidden releases; basically all superseded non-final 
&lt;br&gt;&amp;gt;&amp;gt; releases:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 2.6 Release Candidate 1
&lt;br&gt;&amp;gt;&amp;gt; 2.6 Beta 2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2.6 Beta 1
&lt;br&gt;&amp;gt;&amp;gt; 2.6 Alpha 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2.0 Release Candidate 2
&lt;br&gt;&amp;gt;&amp;gt; 2.0 VS10 CTP
&lt;br&gt;&amp;gt;&amp;gt; 2.0 Release Candidate 1
&lt;br&gt;&amp;gt;&amp;gt; 2.0 Beta 5
&lt;br&gt;&amp;gt;&amp;gt; 2.0 Beta 4
&lt;br&gt;&amp;gt;&amp;gt; 1.1.2 RC1
&lt;br&gt;&amp;gt;&amp;gt; 2.0 Beta 3
&lt;br&gt;&amp;gt;&amp;gt; 2.0 Beta 2
&lt;br&gt;&amp;gt;&amp;gt; 2.0 Beta 1
&lt;br&gt;&amp;gt;&amp;gt; 2.0 Alpha 8
&lt;br&gt;&amp;gt;&amp;gt; 1.1.1 RC1
&lt;br&gt;&amp;gt;&amp;gt; 2.0 Alpha 7
&lt;br&gt;&amp;gt;&amp;gt; 2.0 Alpha 6
&lt;br&gt;&amp;gt;&amp;gt; 2.0 Alpha 5
&lt;br&gt;&amp;gt;&amp;gt; 2.0 Alpha 4
&lt;br&gt;&amp;gt;&amp;gt; 2.0 Alpha 3
&lt;br&gt;&amp;gt;&amp;gt; 2.0 Alpha 2
&lt;br&gt;&amp;gt;&amp;gt; 2.0 Alpha 1
&lt;br&gt;&amp;gt;&amp;gt; 1.1 First Release Candidate
&lt;br&gt;&amp;gt;&amp;gt; 1.1 Beta
&lt;br&gt;&amp;gt;&amp;gt; 1.1 Alpha
&lt;br&gt;&amp;gt;&amp;gt; 1.0 2nd Release Candidate
&lt;br&gt;&amp;gt;&amp;gt; 1.0 Release Candidate
&lt;br&gt;&amp;gt;&amp;gt; 1.0 9th Beta
&lt;br&gt;&amp;gt;&amp;gt; 1.0 8th Beta
&lt;br&gt;&amp;gt;&amp;gt; 1.0 7th Beta
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ~Jimmy
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26263790&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt; [mailto:users-
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26263790&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bounces@...&lt;/a&gt;] On Behalf Of Michael Foord
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Sent: Monday, November 09, 2009 1:28 AM
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; To: Discussion of IronPython
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Subject: [IronPython] IronPython 2.6 RC 1 Release Hidden
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Hello guys,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; IronPython 2.6 Release Candidate 2 supersedes Release Candidate 1, 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; so the RC
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 1 download has been set to hidden. This means that it is no longer 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; available
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; to choose from the list of downloads and links to the download page 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; are now
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; effectively broken.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; If you have wiki admin rights on the IronPython codeplex site then 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; you will
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; still be able to view the page if you are logged in. To see what I 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; mean you
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; will have to log out first.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; It seems to me a bad policy to hide released versions...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Michael
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; -- 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.ironpythoninaction.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ironpythoninaction.com/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Users mailing list
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26263790&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt; Users mailing list
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26263790&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.ironpythoninaction.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ironpythoninaction.com/&lt;/a&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26263790&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/IronPython-2.6-RC-1-Release-Hidden-tp26263362p26263790.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26263595</id>
	<title>Re: IronPython 2.6 RC 1 Release Hidden</title>
	<published>2009-11-09T01:46:50Z</published>
	<updated>2009-11-09T01:46:50Z</updated>
	<author>
		<name>Michael Foord-5</name>
	</author>
	<content type="html">Jimmy Schementi wrote:
&lt;br&gt;&amp;gt; I agree, but I think the desire it to keep that &amp;quot;Releases&amp;quot; list clean. Otherwise it would have every release ever in there. It's a CodePlex limitation that there is no way to hide those releases from that list, while still keeping the links active.
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;I understand the motivation, but making releases that people / projects 
&lt;br&gt;may have depended on is an unacceptable cost in my opinion.
&lt;br&gt;&lt;br&gt;All the best,
&lt;br&gt;&lt;br&gt;Michael
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Here are all the hidden releases; basically all superseded non-final releases:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 2.6 Release Candidate 1
&lt;br&gt;&amp;gt; 2.6 Beta 2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; 2.6 Beta 1
&lt;br&gt;&amp;gt; 2.6 Alpha 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; 2.0 Release Candidate 2
&lt;br&gt;&amp;gt; 2.0 VS10 CTP
&lt;br&gt;&amp;gt; 2.0 Release Candidate 1
&lt;br&gt;&amp;gt; 2.0 Beta 5
&lt;br&gt;&amp;gt; 2.0 Beta 4
&lt;br&gt;&amp;gt; 1.1.2 RC1
&lt;br&gt;&amp;gt; 2.0 Beta 3
&lt;br&gt;&amp;gt; 2.0 Beta 2
&lt;br&gt;&amp;gt; 2.0 Beta 1
&lt;br&gt;&amp;gt; 2.0 Alpha 8
&lt;br&gt;&amp;gt; 1.1.1 RC1
&lt;br&gt;&amp;gt; 2.0 Alpha 7
&lt;br&gt;&amp;gt; 2.0 Alpha 6
&lt;br&gt;&amp;gt; 2.0 Alpha 5
&lt;br&gt;&amp;gt; 2.0 Alpha 4
&lt;br&gt;&amp;gt; 2.0 Alpha 3
&lt;br&gt;&amp;gt; 2.0 Alpha 2
&lt;br&gt;&amp;gt; 2.0 Alpha 1
&lt;br&gt;&amp;gt; 1.1 First Release Candidate
&lt;br&gt;&amp;gt; 1.1 Beta
&lt;br&gt;&amp;gt; 1.1 Alpha
&lt;br&gt;&amp;gt; 1.0 2nd Release Candidate
&lt;br&gt;&amp;gt; 1.0 Release Candidate
&lt;br&gt;&amp;gt; 1.0 9th Beta
&lt;br&gt;&amp;gt; 1.0 8th Beta
&lt;br&gt;&amp;gt; 1.0 7th Beta
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ~Jimmy
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26263595&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt; [mailto:users-
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26263595&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bounces@...&lt;/a&gt;] On Behalf Of Michael Foord
&lt;br&gt;&amp;gt;&amp;gt; Sent: Monday, November 09, 2009 1:28 AM
&lt;br&gt;&amp;gt;&amp;gt; To: Discussion of IronPython
&lt;br&gt;&amp;gt;&amp;gt; Subject: [IronPython] IronPython 2.6 RC 1 Release Hidden
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Hello guys,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; IronPython 2.6 Release Candidate 2 supersedes Release Candidate 1, so the RC
&lt;br&gt;&amp;gt;&amp;gt; 1 download has been set to hidden. This means that it is no longer available
&lt;br&gt;&amp;gt;&amp;gt; to choose from the list of downloads and links to the download page are now
&lt;br&gt;&amp;gt;&amp;gt; effectively broken.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; If you have wiki admin rights on the IronPython codeplex site then you will
&lt;br&gt;&amp;gt;&amp;gt; still be able to view the page if you are logged in. To see what I mean you
&lt;br&gt;&amp;gt;&amp;gt; will have to log out first.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; It seems to me a bad policy to hide released versions...
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Michael
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.ironpythoninaction.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ironpythoninaction.com/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt; Users mailing list
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26263595&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26263595&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.ironpythoninaction.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ironpythoninaction.com/&lt;/a&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26263595&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/IronPython-2.6-RC-1-Release-Hidden-tp26263362p26263595.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26263453</id>
	<title>Re: IronPython 2.6 RC 1 Release Hidden</title>
	<published>2009-11-09T01:35:04Z</published>
	<updated>2009-11-09T01:35:04Z</updated>
	<author>
		<name>Jimmy Schementi</name>
	</author>
	<content type="html">I agree, but I think the desire it to keep that &amp;quot;Releases&amp;quot; list clean. Otherwise it would have every release ever in there. It's a CodePlex limitation that there is no way to hide those releases from that list, while still keeping the links active.
&lt;br&gt;&lt;br&gt;Here are all the hidden releases; basically all superseded non-final releases:
&lt;br&gt;&lt;br&gt;2.6 Release Candidate 1
&lt;br&gt;2.6 Beta 2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;2.6 Beta 1
&lt;br&gt;2.6 Alpha 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;2.0 Release Candidate 2
&lt;br&gt;2.0 VS10 CTP
&lt;br&gt;2.0 Release Candidate 1
&lt;br&gt;2.0 Beta 5
&lt;br&gt;2.0 Beta 4
&lt;br&gt;1.1.2 RC1
&lt;br&gt;2.0 Beta 3
&lt;br&gt;2.0 Beta 2
&lt;br&gt;2.0 Beta 1
&lt;br&gt;2.0 Alpha 8
&lt;br&gt;1.1.1 RC1
&lt;br&gt;2.0 Alpha 7
&lt;br&gt;2.0 Alpha 6
&lt;br&gt;2.0 Alpha 5
&lt;br&gt;2.0 Alpha 4
&lt;br&gt;2.0 Alpha 3
&lt;br&gt;2.0 Alpha 2
&lt;br&gt;2.0 Alpha 1
&lt;br&gt;1.1 First Release Candidate
&lt;br&gt;1.1 Beta
&lt;br&gt;1.1 Alpha
&lt;br&gt;1.0 2nd Release Candidate
&lt;br&gt;1.0 Release Candidate
&lt;br&gt;1.0 9th Beta
&lt;br&gt;1.0 8th Beta
&lt;br&gt;1.0 7th Beta
&lt;br&gt;&lt;br&gt;~Jimmy
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26263453&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt; [mailto:users-
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26263453&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bounces@...&lt;/a&gt;] On Behalf Of Michael Foord
&lt;br&gt;&amp;gt; Sent: Monday, November 09, 2009 1:28 AM
&lt;br&gt;&amp;gt; To: Discussion of IronPython
&lt;br&gt;&amp;gt; Subject: [IronPython] IronPython 2.6 RC 1 Release Hidden
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hello guys,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; IronPython 2.6 Release Candidate 2 supersedes Release Candidate 1, so the RC
&lt;br&gt;&amp;gt; 1 download has been set to hidden. This means that it is no longer available
&lt;br&gt;&amp;gt; to choose from the list of downloads and links to the download page are now
&lt;br&gt;&amp;gt; effectively broken.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; If you have wiki admin rights on the IronPython codeplex site then you will
&lt;br&gt;&amp;gt; still be able to view the page if you are logged in. To see what I mean you
&lt;br&gt;&amp;gt; will have to log out first.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; It seems to me a bad policy to hide released versions...
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Michael
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.ironpythoninaction.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ironpythoninaction.com/&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26263453&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;/div&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26263453&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/IronPython-2.6-RC-1-Release-Hidden-tp26263362p26263453.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26263362</id>
	<title>IronPython 2.6 RC 1 Release Hidden</title>
	<published>2009-11-09T01:28:00Z</published>
	<updated>2009-11-09T01:28:00Z</updated>
	<author>
		<name>Michael Foord-5</name>
	</author>
	<content type="html">Hello guys,
&lt;br&gt;&lt;br&gt;IronPython 2.6 Release Candidate 2 supersedes Release Candidate 1, so 
&lt;br&gt;the RC 1 download has been set to hidden. This means that it is no 
&lt;br&gt;longer available to choose from the list of downloads and links to the 
&lt;br&gt;download page are now effectively broken.
&lt;br&gt;&lt;br&gt;If you have wiki admin rights on the IronPython codeplex site then you 
&lt;br&gt;will still be able to view the page if you are logged in. To see what I 
&lt;br&gt;mean you will have to log out first.
&lt;br&gt;&lt;br&gt;It seems to me a bad policy to hide released versions...
&lt;br&gt;&lt;br&gt;Michael
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.ironpythoninaction.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ironpythoninaction.com/&lt;/a&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26263362&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/IronPython-2.6-RC-1-Release-Hidden-tp26263362p26263362.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26239526</id>
	<title>Re: DataBinding and INotifyPropertyChanged in IronPython</title>
	<published>2009-11-06T14:22:15Z</published>
	<updated>2009-11-06T14:22:15Z</updated>
	<author>
		<name>Jimmy Schementi</name>
	</author>
	<content type="html">&amp;gt; It links to &lt;a href=&quot;http://sdlsdk.codeplex.com/Thread/View.aspx?ThreadId=30322&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sdlsdk.codeplex.com/Thread/View.aspx?ThreadId=30322&lt;/a&gt;&lt;br&gt;&amp;gt; that should have more information about how to implement
&lt;br&gt;&amp;gt; INotifyPropertyChanged in IronPython which I am also interested in.
&lt;br&gt;&amp;gt; Unfortunately this page is no more available. Does the guideline exist
&lt;br&gt;&amp;gt; somewhere else? Thanks.
&lt;br&gt;&lt;br&gt;I've re-enabled the discussions tab on that defunct project, so that link is now active again.
&lt;br&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26239526&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/DataBinding-and-INotifyPropertyChanged-in-IronPython-tp26239215p26239526.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26239491</id>
	<title>Re: Embedded IronPython 2.6 Module Name</title>
	<published>2009-11-06T14:18:20Z</published>
	<updated>2009-11-06T14:18:20Z</updated>
	<author>
		<name>Curt Hagenlocher</name>
	</author>
	<content type="html">It looks like you can just create the PythonModule directly now -- it&amp;#39;s a public class with a public constructor.&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Nov 5, 2009 at 12:14 PM, Jonathan Howard &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26239491&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jhoward@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;Thanks for the help, Curt.  Perhaps it&amp;#39;s a problem with the latest, RC?  There is no &amp;quot;CreateModule&amp;quot; function on the PythonContext object. 
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;font color=&quot;#888888&quot;&gt;
&lt;div&gt;~Jonathan&lt;/div&gt;&lt;/font&gt;&lt;br&gt;_______________________________________________&lt;br&gt;Users mailing list&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26239491&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26239491&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Embedded-IronPython-2.6-Module-Name-tp26219428p26239491.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26239437</id>
	<title>Re: DataBinding and INotifyPropertyChanged in IronPython</title>
	<published>2009-11-06T14:14:26Z</published>
	<updated>2009-11-06T14:14:26Z</updated>
	<author>
		<name>Curt Hagenlocher</name>
	</author>
	<content type="html">&lt;div&gt;Why don&amp;#39;t you think that __setattr__ is a good approach? The alternative (as shown in the linked Japanese-language blog) is to implement setters for the properties you care about and to manually trigger the event.&lt;br&gt;
&lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/6 Lukas Cenovsky &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26239437&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cenovsky@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;Hi all,&lt;br&gt;I was looking for WPF data binding in IronPython and I have found nice Japanese blog about it:&lt;br&gt;
&lt;a href=&quot;http://palepoli.skr.jp/wp/2009/06/28/wpf-listview-databinding-for-ironpython/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://palepoli.skr.jp/wp/2009/06/28/wpf-listview-databinding-for-ironpython/&lt;/a&gt;&lt;br&gt;&lt;br&gt;It links to &lt;a href=&quot;http://sdlsdk.codeplex.com/Thread/View.aspx?ThreadId=30322&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://sdlsdk.codeplex.com/Thread/View.aspx?ThreadId=30322&lt;/a&gt; that should have more information about how to implement INotifyPropertyChanged in IronPython which I am also interested in. Unfortunately this page is no more available. Does the guideline exist somewhere else? Thanks.&lt;br&gt;
&lt;br&gt;PS: I know about &lt;a href=&quot;http://lists.ironpython.com/pipermail/users-ironpython.com/2009-August/010938.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/pipermail/users-ironpython.com/2009-August/010938.html&lt;/a&gt; but I don&amp;#39;t think using __setattr__ is good approach. Also implementing the PropertyChanged event is different on the blog.&lt;br&gt;
&lt;font color=&quot;#888888&quot;&gt;&lt;br&gt;--&lt;br&gt;-- Lukáš&lt;br&gt;_______________________________________________&lt;br&gt;Users mailing list&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26239437&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26239437&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/DataBinding-and-INotifyPropertyChanged-in-IronPython-tp26239215p26239437.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26239215</id>
	<title>DataBinding and INotifyPropertyChanged in IronPython</title>
	<published>2009-11-06T13:58:38Z</published>
	<updated>2009-11-06T13:58:38Z</updated>
	<author>
		<name>Lukas Cenovsky</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;I was looking for WPF data binding in IronPython and I have found nice 
&lt;br&gt;Japanese blog about it:
&lt;br&gt;&lt;a href=&quot;http://palepoli.skr.jp/wp/2009/06/28/wpf-listview-databinding-for-ironpython/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://palepoli.skr.jp/wp/2009/06/28/wpf-listview-databinding-for-ironpython/&lt;/a&gt;&lt;br&gt;&lt;br&gt;It links to &lt;a href=&quot;http://sdlsdk.codeplex.com/Thread/View.aspx?ThreadId=30322&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sdlsdk.codeplex.com/Thread/View.aspx?ThreadId=30322&lt;/a&gt;&amp;nbsp;
&lt;br&gt;that should have more information about how to implement 
&lt;br&gt;INotifyPropertyChanged in IronPython which I am also interested in. 
&lt;br&gt;Unfortunately this page is no more available. Does the guideline exist 
&lt;br&gt;somewhere else? Thanks.
&lt;br&gt;&lt;br&gt;PS: I know about 
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/pipermail/users-ironpython.com/2009-August/010938.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/pipermail/users-ironpython.com/2009-August/010938.html&lt;/a&gt;&amp;nbsp;
&lt;br&gt;but I don't think using __setattr__ is good approach. Also implementing 
&lt;br&gt;the PropertyChanged event is different on the blog.
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;-- Lukáš
&lt;br&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26239215&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/DataBinding-and-INotifyPropertyChanged-in-IronPython-tp26239215p26239215.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26237236</id>
	<title>Re: System.TimeSpan can't add time from IronPython</title>
	<published>2009-11-06T11:13:40Z</published>
	<updated>2009-11-06T11:13:40Z</updated>
	<author>
		<name>Dino Viehland</name>
	</author>
	<content type="html">&lt;html xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:x=&quot;urn:schemas-microsoft-com:office:excel&quot; xmlns:p=&quot;urn:schemas-microsoft-com:office:powerpoint&quot; xmlns:a=&quot;urn:schemas-microsoft-com:office:access&quot; xmlns:dt=&quot;uuid:C2F41010-65B3-11d1-A29F-00AA00C14882&quot; xmlns:s=&quot;uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882&quot; xmlns:rs=&quot;urn:schemas-microsoft-com:rowset&quot; xmlns:Z=&quot;urn:schemas-microsoft-com:&quot; xmlns:b=&quot;urn:schemas-microsoft-com:office:publisher&quot; xmlns:ss=&quot;urn:schemas-microsoft-com:office:spreadsheet&quot; xmlns:c=&quot;urn:schemas-microsoft-com:office:component:spreadsheet&quot; xmlns:odc=&quot;urn:schemas-microsoft-com:office:odc&quot; xmlns:oa=&quot;urn:schemas-microsoft-com:office:activation&quot; xmlns:html=&quot;http://www.w3.org/TR/REC-html40&quot; xmlns:q=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:rtc=&quot;http://microsoft.com/officenet/conferencing&quot; xmlns:D=&quot;DAV:&quot; xmlns:Repl=&quot;http://schemas.microsoft.com/repl/&quot; xmlns:mt=&quot;http://schemas.microsoft.com/sharepoint/soap/meetings/&quot; xmlns:x2=&quot;http://schemas.microsoft.com/office/excel/2003/xml&quot; xmlns:ppda=&quot;http://www.passport.com/NameSpace.xsd&quot; xmlns:ois=&quot;http://schemas.microsoft.com/sharepoint/soap/ois/&quot; xmlns:dir=&quot;http://schemas.microsoft.com/sharepoint/soap/directory/&quot; xmlns:ds=&quot;http://www.w3.org/2000/09/xmldsig#&quot; xmlns:dsp=&quot;http://schemas.microsoft.com/sharepoint/dsp&quot; xmlns:udc=&quot;http://schemas.microsoft.com/data/udc&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:sub=&quot;http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/&quot; xmlns:ec=&quot;http://www.w3.org/2001/04/xmlenc#&quot; xmlns:sp=&quot;http://schemas.microsoft.com/sharepoint/&quot; xmlns:sps=&quot;http://schemas.microsoft.com/sharepoint/soap/&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:udcs=&quot;http://schemas.microsoft.com/data/udc/soap&quot; xmlns:udcxf=&quot;http://schemas.microsoft.com/data/udc/xmlfile&quot; xmlns:udcp2p=&quot;http://schemas.microsoft.com/data/udc/parttopart&quot; xmlns:wf=&quot;http://schemas.microsoft.com/sharepoint/soap/workflow/&quot; xmlns:dsss=&quot;http://schemas.microsoft.com/office/2006/digsig-setup&quot; xmlns:dssi=&quot;http://schemas.microsoft.com/office/2006/digsig&quot; xmlns:mdssi=&quot;http://schemas.openxmlformats.org/package/2006/digital-signature&quot; xmlns:mver=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot; xmlns:m=&quot;http://schemas.microsoft.com/office/2004/12/omml&quot; xmlns:mrels=&quot;http://schemas.openxmlformats.org/package/2006/relationships&quot; xmlns:spwp=&quot;http://microsoft.com/sharepoint/webpartpages&quot; xmlns:ex12t=&quot;http://schemas.microsoft.com/exchange/services/2006/types&quot; xmlns:ex12m=&quot;http://schemas.microsoft.com/exchange/services/2006/messages&quot; xmlns:pptsl=&quot;http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/&quot; xmlns:spsl=&quot;http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService&quot; xmlns:st=&quot;&amp;#1;&quot; xmlns=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;

&lt;head&gt;
&lt;META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html; charset=us-ascii&quot;&gt;
&lt;meta name=Generator content=&quot;Microsoft Word 12 (filtered medium)&quot;&gt;

&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext=&quot;edit&quot; spidmax=&quot;1026&quot; /&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext=&quot;edit&quot;&gt;
  &lt;o:idmap v:ext=&quot;edit&quot; data=&quot;1&quot; /&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;
&lt;/head&gt;

&lt;body lang=EN-US link=blue vlink=purple&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;span.Add() returns a new TimeSpan object, it does not mutate the
existing object.&amp;nbsp; You can see that the result of span.Add(hour) printed out the
2:00:00 time span in the repl that was returned.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26237236&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26237236&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;] &lt;b&gt;On Behalf Of &lt;/b&gt;Jan Rouvillain&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Friday, November 06, 2009 11:08 AM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; [IronPython] System.TimeSpan can't add time from IronPython&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='margin-bottom:12.0pt'&gt;Hi,&lt;br&gt;
&lt;br&gt;
System.TimeSpan does not add time when using Add:&lt;br&gt;
&lt;br&gt;
&lt;span class=gi&gt;&amp;gt;&amp;gt;&amp;gt; clr.AddReference('System')&lt;/span&gt;&lt;br&gt;
&lt;span class=gi&gt;&amp;gt;&amp;gt;&amp;gt; span = System.TimeSpan(1,0,0)&lt;/span&gt;&lt;br&gt;
&lt;span class=gi&gt;&amp;gt;&amp;gt;&amp;gt; span.ToString()&lt;/span&gt;&lt;br&gt;
&lt;span class=gi&gt;'01:00:00'&lt;/span&gt;&lt;br&gt;
&lt;span class=gi&gt;&amp;gt;&amp;gt;&amp;gt; hour = System.TimeSpan(1,0,0)&lt;/span&gt;&lt;br&gt;
&lt;span class=gi&gt;&amp;gt;&amp;gt;&amp;gt; hour.ToString()&lt;/span&gt;&lt;br&gt;
&lt;span class=gi&gt;'01:00:00'&lt;/span&gt;&lt;br&gt;
&lt;span class=gi&gt;&amp;gt;&amp;gt;&amp;gt; span.Add(hour)&lt;/span&gt;&lt;br&gt;
&lt;span class=gi&gt;&amp;lt;System.TimeSpan object at 0x000000000000002B [02:00:00]&amp;gt;&lt;/span&gt;&lt;br&gt;
&lt;span class=gi&gt;&amp;gt;&amp;gt;&amp;gt; span.ToString()&lt;/span&gt;&lt;br&gt;
&lt;span class=gi&gt;'01:00:00'&lt;/span&gt;&lt;br&gt;
&lt;span class=gi&gt;&amp;nbsp;&lt;/span&gt;&lt;br&gt;
&lt;span class=gi&gt;Should have been '02:00:00', because 1 hour is added.&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Regards&lt;br&gt;
Jan Rou&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26237236&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/System.TimeSpan-can%27t-add-time-from-IronPython-tp26237163p26237236.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26237163</id>
	<title>System.TimeSpan can't add time from IronPython</title>
	<published>2009-11-06T11:07:53Z</published>
	<updated>2009-11-06T11:07:53Z</updated>
	<author>
		<name>Jan R-2</name>
	</author>
	<content type="html">Hi,&lt;br&gt;&lt;br&gt;System.TimeSpan does not add time when using Add:&lt;br&gt;&lt;br&gt;&lt;span class=&quot;gI&quot;&gt;&amp;gt;&amp;gt;&amp;gt; clr.AddReference(&amp;#39;System&amp;#39;)&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; span = System.TimeSpan(1,0,0)&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; span.ToString()&lt;br&gt;&amp;#39;01:00:00&amp;#39;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; hour = System.TimeSpan(1,0,0)&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; hour.ToString()&lt;br&gt;&amp;#39;01:00:00&amp;#39;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; span.Add(hour)&lt;br&gt;&amp;lt;System.TimeSpan object at 0x000000000000002B [02:00:00]&amp;gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; span.ToString()&lt;br&gt;
&amp;#39;01:00:00&amp;#39;&lt;br&gt; &lt;br&gt;Should have been &lt;/span&gt;&lt;span class=&quot;gI&quot;&gt;&amp;#39;02:00:00&amp;#39;, because 1 hour is added.&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Regards&lt;br&gt;Jan Rou&lt;br&gt;&lt;br&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26237163&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/System.TimeSpan-can%27t-add-time-from-IronPython-tp26237163p26237163.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26236365</id>
	<title>Re: What's wrong with IronPython (UIAutomation)</title>
	<published>2009-11-06T10:18:53Z</published>
	<updated>2009-11-06T10:18:53Z</updated>
	<author>
		<name>Shri Borde</name>
	</author>
	<content type="html">&lt;html xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:m=&quot;http://schemas.microsoft.com/office/2004/12/omml&quot; xmlns=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;

&lt;head&gt;
&lt;META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html; charset=us-ascii&quot;&gt;
&lt;meta name=Generator content=&quot;Microsoft Word 12 (filtered medium)&quot;&gt;

&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext=&quot;edit&quot; spidmax=&quot;1026&quot; /&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext=&quot;edit&quot;&gt;
  &lt;o:idmap v:ext=&quot;edit&quot; data=&quot;1&quot; /&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;
&lt;/head&gt;

&lt;body lang=EN-US link=blue vlink=purple&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;In the past, there had been issues with UIAutomation as
mentioned in &lt;a href=&quot;http://blogs.msdn.com/shrib/archive/2008/03/24/ironpython-cannot-call-automationelement-fromhandle.aspx&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://blogs.msdn.com/shrib/archive/2008/03/24/ironpython-cannot-call-automationelement-fromhandle.aspx&lt;/a&gt;.
This could be related. You could try it on Win7 to see if its fixed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;You can also try the techniques mentioned in &lt;a href=&quot;http://blogs.msdn.com/shrib/archive/2008/03/24/what-if-a-c-snippet-does-not-work-when-transliterated-to-ironpython.aspx&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://blogs.msdn.com/shrib/archive/2008/03/24/what-if-a-c-snippet-does-not-work-when-transliterated-to-ironpython.aspx&lt;/a&gt;
to narrow down the problem.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26236365&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26236365&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;] &lt;b&gt;On
Behalf Of &lt;/b&gt;Jozef&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Friday, November 06, 2009 6:20 AM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26236365&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; [IronPython] What's wrong with IronPython (UIAutomation)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;Hi,&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;I'm using UIAutomation framework with IronPython to test our
application.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;For WPF dialogs it works perfectly. But I run into trouble
when try to use it for some older dialogs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;The problem:&amp;nbsp; With IronPython I'm not able to get
proper control type. Any controls appears as ControlType.Pane&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;Simple example: (with windows calculator)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;--------------------------------------- IP Code
------------------------------------------------------&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;import clr&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;clr.AddReference('UIAutomationClient')&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;clr.AddReference('UIAutomationTypes')&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;from System.Windows.Automation import *&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;_rootElement = AutomationElement.RootElement&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;if __name__ == '__main__':&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:30.0pt'&gt;

&lt;p class=MsoNormal&gt;nameCondition =
PropertyCondition(AutomationElement.NameProperty, &amp;quot;Calculator&amp;quot;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:30.0pt'&gt;

&lt;p class=MsoNormal&gt;typeCondition =
PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Window)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:30.0pt'&gt;

&lt;p class=MsoNormal&gt;calcCondition = AndCondition(nameCondition, typeCondition)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:30.0pt'&gt;

&lt;p class=MsoNormal&gt;appCalc = _rootElement.FindFirst(TreeScope.Children,
calcCondition)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:30.0pt'&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:30.0pt'&gt;

&lt;p class=MsoNormal&gt;if appCalc is not None:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:30.0pt'&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp; &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:60.0pt'&gt;

&lt;p class=MsoNormal&gt;isFocusable =
appCalc.GetCurrentPropertyValue(AutomationElement.IsKeyboardFocusableProperty,
True)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:60.0pt'&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:60.0pt'&gt;

&lt;p class=MsoNormal&gt;if isFocusable:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:1.25in'&gt;

&lt;p class=MsoNormal&gt;#appCalc.SetFocus() &amp;nbsp; #calling this raise:
System.InvalidOperationException&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:1.25in'&gt;

&lt;p class=MsoNormal&gt;pass&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:60.0pt'&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:60.0pt'&gt;

&lt;p class=MsoNormal&gt;contList = appCalc.FindAll(TreeScope.Subtree,
Condition.TrueCondition)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:60.0pt'&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp; &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:60.0pt'&gt;

&lt;p class=MsoNormal&gt;for elm in contList:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:1.25in'&gt;

&lt;p class=MsoNormal&gt;progName = elm.Current.ControlType.ProgrammaticName&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:1.25in'&gt;

&lt;p class=MsoNormal&gt;print progName&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;-----------------------------------------------------------------------------------------------------------&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;above code produce following output:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;ControlType.Window&lt;br&gt;
ControlType.Pane&lt;br&gt;
ControlType.Pane&lt;br&gt;
ControlType.Pane&lt;br&gt;
ControlType.Pane&lt;br&gt;
ControlType.Pane&lt;br&gt;
.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;.&lt;br&gt;
&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp; &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;similar C# code works as expected&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;------------------------------------------ C# Code
---------------------------------------------------&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;using System;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;using System.Collections.Generic;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;using System.Linq;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;using System.Text;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;using System.Windows.Automation;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;using Automation = System.Windows.Automation;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;namespace UIAutTest&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;class Program&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:30.0pt'&gt;

&lt;p class=MsoNormal&gt;static void Main(string[] args)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:30.0pt'&gt;

&lt;p class=MsoNormal&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:30.0pt'&gt;

&lt;p class=MsoNormal&gt;AutomationElement rootElement =
AutomationElement.RootElement;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:30.0pt'&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:30.0pt'&gt;

&lt;p class=MsoNormal&gt;Automation.Condition nameCondition = new
PropertyCondition(AutomationElement.NameProperty, &amp;quot;Calculator&amp;quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:30.0pt'&gt;

&lt;p class=MsoNormal&gt;Automation.Condition controlCondition = new
PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Window);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:30.0pt'&gt;

&lt;p class=MsoNormal&gt;Automation.Condition calcCondition = new
AndCondition(nameCondition, controlCondition);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:30.0pt'&gt;

&lt;p class=MsoNormal&gt;AutomationElement appCalc =
rootElement.FindFirst(TreeScope.Children, calcCondition);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:30.0pt'&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:30.0pt'&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:60.0pt'&gt;

&lt;p class=MsoNormal&gt;if (appCalc != null)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:60.0pt'&gt;

&lt;p class=MsoNormal&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:60.0pt'&gt;

&lt;p class=MsoNormal&gt;appCalc.SetFocus();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:60.0pt'&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:60.0pt'&gt;

&lt;p class=MsoNormal&gt;AutomationElementCollection allCont =
appCalc.FindAll(TreeScope.Subtree, Condition.TrueCondition);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:1.25in'&gt;

&lt;p class=MsoNormal&gt;foreach (AutomationElement elm in allCont)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:1.25in'&gt;

&lt;p class=MsoNormal&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:1.25in'&gt;

&lt;p class=MsoNormal&gt;string contProgNam =
elm.Current.ControlType.ProgrammaticName;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:1.25in'&gt;

&lt;p class=MsoNormal&gt;Console.WriteLine(contProgNam);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:1.25in'&gt;

&lt;p class=MsoNormal&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:60.0pt'&gt;

&lt;p class=MsoNormal&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:60.0pt'&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div style='margin-left:30.0pt'&gt;

&lt;p class=MsoNormal&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;---------------------------------------------------------------------------------------------&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;C# code produce this output:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;ControlType.Window&lt;br&gt;
ControlType.Edit&lt;br&gt;
ControlType.CheckBox&lt;br&gt;
ControlType.CheckBox&lt;br&gt;
ControlType.Group&lt;br&gt;
ControlType.Button&lt;br&gt;
ControlType.RadioButton&lt;br&gt;
ControlType.RadioButton&lt;br&gt;
ControlType.RadioButton&lt;br&gt;
ControlType.RadioButton&lt;br&gt;
ControlType.Group&lt;br&gt;
ControlType.Group&lt;br&gt;
ControlType.RadioButton&lt;br&gt;
ControlType.RadioButton&lt;br&gt;
ControlType.RadioButton&lt;br&gt;
ControlType.Button&lt;br&gt;
.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;Does anybody know why ControlType property retrieved by IP
code is different then ControlType retrieved by C# ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;Others element properties retrieved by IP code seems to by
OK.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;Info:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;Windows Vista Business, SP2&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;IronPython 2.6 (2.6.10920.0) on .NET 2.0.50727.4200&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;Thanks,&lt;br&gt;
Jozef&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;PS: &amp;nbsp;Duane Kaufman, send similar question : &amp;nbsp;&lt;a href=&quot;http://lists.ironpython.com/htdig.cgi/users-ironpython.com/2009-June/010693.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/htdig.cgi/users-ironpython.com/2009-June/010693.html&lt;/a&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;But, no one answer him. &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26236365&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/What%27s-wrong-with-IronPython-%28UIAutomation%29-tp26232737p26236365.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26235180</id>
	<title>IronPython 2.6 CodePlex Source Update</title>
	<published>2009-11-06T08:53:40Z</published>
	<updated>2009-11-06T08:53:40Z</updated>
	<author>
		<name>merllab</name>
	</author>
	<content type="html">This is an automated email letting you know that sources 
&lt;br&gt;have recently been pushed out. &amp;nbsp;You can download these newer 
&lt;br&gt;sources directly from &lt;a href=&quot;http://ironpython.codeplex.com/SourceControl/changeset/view/61130&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ironpython.codeplex.com/SourceControl/changeset/view/61130&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;ADDED SOURCES
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/io_related/_fileio_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/io_related/__init__.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/io_related/codecs_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/io_related/cPickle_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/io_related/_bytesio_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/io_related/binascii_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/io_related/copy_reg_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/io_related
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/io_related/cStringIO_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/io_related/marshal_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/io_related/re_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/misc
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/misc/__init__.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/misc/_random_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/misc/_sha256.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/misc/_sha512.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/misc/_warnings_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/misc/_weakref_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/misc/datetime_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/misc/future_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/misc/math_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/misc/operator_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/misc/system_namespaces.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/network_related
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/network_related/__init__.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/network_related/_ssl_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/network_related/socket_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/system_related
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/system_related/__init__.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/system_related/_locale_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/system_related/gc_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/system_related/nt_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/system_related/sys_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/system_related/thread_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/system_related/time_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/type_related
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/type_related/__init__.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/type_related/_struct_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/type_related/array_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/type_related/types_test.py
&lt;br&gt;&lt;br&gt;DELETED SOURCES
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/_fileio_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/array_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/_bytesio_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/_warnings_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/_ssl_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/_sha256.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/system_namespaces.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/_sha512.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/types_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/test_copy_reg.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/test_future.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/test_datetime.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/test_cStringIO.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/test_cPickle.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/test_codecs.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/test_binascii.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/test_nt.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/test_locale.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/test_re.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/test_random.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/test_operator.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/test_math.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/test_marshal.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/test_gc.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/test_sys.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/test_thread.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/test_struct.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/test_socket.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/test_time.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/test_weakref.py
&lt;br&gt;&lt;br&gt;MODIFIED SOURCES
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/io_related/_fileio_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/io_related/__init__.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/io_related/codecs_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/io_related/cPickle_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/io_related/_bytesio_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/io_related/binascii_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/io_related/copy_reg_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Microsoft.Scripting.Silverlight/DynamicLanguageConfig.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/io_related/cStringIO_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/io_related/marshal_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/io_related/re_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/misc/__init__.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/misc/_random_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/misc/_sha256.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/misc/_sha512.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/misc/_warnings_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/misc/_weakref_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/misc/datetime_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/misc/future_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/misc/math_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/misc/operator_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/misc/system_namespaces.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/network_related/__init__.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/network_related/_ssl_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/network_related/socket_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/system_related/__init__.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/system_related/_locale_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/system_related/gc_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/system_related/nt_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/system_related/sys_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Microsoft.Scripting.Silverlight/Repl.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Hosts/SilverLight/Microsoft.Scripting.Silverlight/DynamicApplication.cs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/system_related/thread_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/system_related/time_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/type_related/__init__.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/type_related/_struct_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/type_related/array_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/modules/type_related/types_test.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_Main/Src/Tests/RunAgainstCpy.py
&lt;br&gt;&lt;br&gt;CHECKIN COMMENTS
&lt;br&gt;--------------------------------------------------------------------------------
&lt;br&gt;Changeset Id: 1255422
&lt;br&gt;Date: 11/5/2009 10:12:03 AM
&lt;br&gt;&lt;br&gt;(dfugate) - throughput improvements to RowanTest.vsmdi (e.g., two COM interop test lists now)
&lt;br&gt;- moved nearly all of our standard module tests to IronPython\Tests\modules\*
&lt;br&gt;- cpy.bat: pass the &amp;quot;-B&amp;quot; flag so we don't generate *.pyc files
&lt;br&gt;- copy_reg_test.py: this test corrupted copy_reg._reconstructor without restoring it. &amp;nbsp;This causes issues when running copy_reg_test with other tests in the same process. &amp;nbsp;Fixed
&lt;br&gt;- fixes an ancient issue WRT to running test_math.py under CPy
&lt;br&gt;&lt;br&gt;&lt;br&gt;(Shelveset: SNAP_IMPROVE02;REDMOND\dfugate | SNAP CheckinId: 9755)
&lt;br&gt;--------------------------------------------------------------------------------
&lt;br&gt;Changeset Id: 1257061
&lt;br&gt;Date: 11/5/2009 10:35:08 PM
&lt;br&gt;&lt;br&gt;(jimmysch) Fixes: &lt;a href=&quot;http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=25174&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=25174&lt;/a&gt;&lt;br&gt;Files modified: DynamicLanguageConfig.cs
&lt;br&gt;Makes the language.config file optional again as far as Microsoft.Scripting.Silverlight is concerned.
&lt;br&gt;&lt;br&gt;Fixes: &lt;a href=&quot;http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=25209&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=25209&lt;/a&gt;&lt;br&gt;Files modified: DynamicApplication.cs, Repl.cs, and python\index.html
&lt;br&gt;The &amp;quot;console&amp;quot; initParam was broken. Now it shows the Repl for the first used language. Provides a handle to the Repl (DynamicApplication.Current.Console) to access the OutputBuffer property if the app wants to redirect output to it. The output-redirection should happen by default, but that'll be a fix for 2.6.1.
&lt;br&gt;&lt;br&gt;Does NOT fix &lt;a href=&quot;http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=25208;&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=25208;&lt;/a&gt;&amp;nbsp;this will be checked directly into the 2.6 branch.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;(Shelveset: ipy-rc2-fixes;REDMOND\jimmysch | SNAP CheckinId: 9765)
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26235180&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/IronPython-2.6-CodePlex-Source-Update-tp26235180p26235180.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26232737</id>
	<title>What's wrong with IronPython (UIAutomation)</title>
	<published>2009-11-06T06:19:54Z</published>
	<updated>2009-11-06T06:19:54Z</updated>
	<author>
		<name>Jozef-3</name>
	</author>
	<content type="html">&lt;div&gt;Hi,&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I&amp;#39;m using UIAutomation framework with IronPython to test our application.&lt;/div&gt;&lt;div&gt;For WPF dialogs it works perfectly. But I run into trouble when try to use it for some older dialogs.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;The problem:  With IronPython I&amp;#39;m not able to get proper control type. Any controls appears as ControlType.Pane &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Simple example: (with windows calculator)&lt;/div&gt;&lt;div&gt;--------------------------------------- IP Code ------------------------------------------------------&lt;/div&gt;
&lt;div&gt;import clr&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;clr.AddReference(&amp;#39;UIAutomationClient&amp;#39;)&lt;/div&gt;&lt;div&gt;clr.AddReference(&amp;#39;UIAutomationTypes&amp;#39;)&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;from System.Windows.Automation import *&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;_rootElement = AutomationElement.RootElement&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;if __name__ == &amp;#39;__main__&amp;#39;:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 40px&quot;&gt;    nameCondition = PropertyCondition(AutomationElement.NameProperty, &amp;quot;Calculator&amp;quot;)&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px&quot;&gt;    typeCondition = PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Window)&lt;/div&gt;&lt;div style=&quot;margin-left: 40px&quot;&gt;    calcCondition = AndCondition(nameCondition, typeCondition)&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px&quot;&gt;    appCalc = _rootElement.FindFirst(TreeScope.Children, calcCondition)&lt;/div&gt;&lt;div style=&quot;margin-left: 40px&quot;&gt;        &lt;br&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 40px&quot;&gt;    if appCalc is not None:&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px&quot;&gt;        &lt;/div&gt;&lt;div style=&quot;margin-left: 80px&quot;&gt;        isFocusable = appCalc.GetCurrentPropertyValue(AutomationElement.IsKeyboardFocusableProperty, True)&lt;/div&gt;&lt;div style=&quot;margin-left: 80px&quot;&gt;        &lt;br&gt;
&lt;/div&gt;&lt;div style=&quot;margin-left: 80px&quot;&gt;        if isFocusable:&lt;/div&gt;&lt;div style=&quot;margin-left: 120px&quot;&gt;#appCalc.SetFocus()   #calling this raise: System.InvalidOperationException&lt;/div&gt;&lt;div style=&quot;margin-left: 120px&quot;&gt;pass&lt;/div&gt;
&lt;div style=&quot;margin-left: 80px&quot;&gt;        &lt;br&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 80px&quot;&gt;        contList = appCalc.FindAll(TreeScope.Subtree, Condition.TrueCondition)&lt;/div&gt;&lt;div style=&quot;margin-left: 80px&quot;&gt;        &lt;/div&gt;&lt;div style=&quot;margin-left: 80px&quot;&gt;
        for elm in contList:&lt;/div&gt;&lt;div style=&quot;margin-left: 120px&quot;&gt;progName = elm.Current.ControlType.ProgrammaticName&lt;/div&gt;&lt;div style=&quot;margin-left: 120px&quot;&gt;print progName&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 0px&quot;&gt;-----------------------------------------------------------------------------------------------------------&lt;/div&gt;
&lt;div style=&quot;margin-left: 0px&quot;&gt;above code produce following output:&lt;/div&gt;&lt;div style=&quot;margin-left: 0px&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 0px&quot;&gt;ControlType.Window&lt;br&gt;ControlType.Pane&lt;br&gt;ControlType.Pane&lt;br&gt;ControlType.Pane&lt;br&gt;
ControlType.Pane&lt;br&gt;ControlType.Pane&lt;br&gt;.&lt;/div&gt;&lt;div style=&quot;margin-left: 0px&quot;&gt;.&lt;/div&gt;&lt;div style=&quot;margin-left: 0px&quot;&gt;.&lt;br&gt; &lt;/div&gt;&lt;div style=&quot;margin-left: 0px&quot;&gt;            &lt;/div&gt;&lt;div style=&quot;margin-left: 0px&quot;&gt;similar C# code works as expected&lt;/div&gt;
&lt;div style=&quot;margin-left: 0px&quot;&gt;            ------------------------------------------ C# Code ---------------------------------------------------&lt;/div&gt;&lt;div style=&quot;margin-left: 0px&quot;&gt;using System;&lt;div&gt;using System.Collections.Generic;&lt;/div&gt;
&lt;div&gt;using System.Linq;&lt;/div&gt;&lt;div&gt;using System.Text;&lt;/div&gt;&lt;div&gt;using System.Windows.Automation;&lt;/div&gt;&lt;div&gt;using Automation = System.Windows.Automation;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;namespace UIAutTest&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;    class Program&lt;/div&gt;
&lt;div&gt;    {&lt;/div&gt;&lt;div style=&quot;margin-left: 40px&quot;&gt;        static void Main(string[] args)&lt;/div&gt;&lt;div style=&quot;margin-left: 40px&quot;&gt;        {&lt;/div&gt;&lt;div style=&quot;margin-left: 40px&quot;&gt;            AutomationElement rootElement = AutomationElement.RootElement;&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 40px&quot;&gt;            Automation.Condition nameCondition = new PropertyCondition(AutomationElement.NameProperty, &amp;quot;Calculator&amp;quot;);&lt;/div&gt;&lt;div style=&quot;margin-left: 40px&quot;&gt;
            Automation.Condition controlCondition = new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Window);&lt;/div&gt;&lt;div style=&quot;margin-left: 40px&quot;&gt;            Automation.Condition calcCondition = new AndCondition(nameCondition, controlCondition);&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px&quot;&gt;            AutomationElement appCalc = rootElement.FindFirst(TreeScope.Children, calcCondition);&lt;/div&gt;&lt;div style=&quot;margin-left: 40px&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 40px&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 80px&quot;&gt;
            if (appCalc != null)&lt;/div&gt;&lt;div style=&quot;margin-left: 80px&quot;&gt;            {&lt;/div&gt;&lt;div style=&quot;margin-left: 80px&quot;&gt;                appCalc.SetFocus();&lt;/div&gt;&lt;div style=&quot;margin-left: 80px&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 80px&quot;&gt;
                AutomationElementCollection allCont = appCalc.FindAll(TreeScope.Subtree, Condition.TrueCondition);&lt;/div&gt;&lt;div style=&quot;margin-left: 120px&quot;&gt;                foreach (AutomationElement elm in allCont)&lt;/div&gt;&lt;div style=&quot;margin-left: 120px&quot;&gt;
                {&lt;/div&gt;&lt;div style=&quot;margin-left: 120px&quot;&gt;                    string contProgNam = elm.Current.ControlType.ProgrammaticName;&lt;/div&gt;&lt;div style=&quot;margin-left: 120px&quot;&gt;                    Console.WriteLine(contProgNam);&lt;/div&gt;
&lt;div style=&quot;margin-left: 120px&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;margin-left: 80px&quot;&gt;            }&lt;/div&gt;&lt;div style=&quot;margin-left: 80px&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 40px&quot;&gt;        }&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;---------------------------------------------------------------------------------------------&lt;/div&gt;
&lt;div&gt;C# code produce this output:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;ControlType.Window&lt;br&gt;ControlType.Edit&lt;br&gt;ControlType.CheckBox&lt;br&gt;ControlType.CheckBox&lt;br&gt;ControlType.Group&lt;br&gt;ControlType.Button&lt;br&gt;ControlType.RadioButton&lt;br&gt;ControlType.RadioButton&lt;br&gt;
ControlType.RadioButton&lt;br&gt;ControlType.RadioButton&lt;br&gt;ControlType.Group&lt;br&gt;ControlType.Group&lt;br&gt;ControlType.RadioButton&lt;br&gt;ControlType.RadioButton&lt;br&gt;ControlType.RadioButton&lt;br&gt;ControlType.Button&lt;br&gt;.&lt;br&gt;&lt;/div&gt;&lt;div&gt;.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Does anybody know why ControlType property retrieved by IP code is different then ControlType retrieved by C# ?&lt;br&gt;&lt;/div&gt;&lt;div&gt;Others element properties retrieved by IP code seems to by OK.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Info:&lt;br&gt;&lt;/div&gt;&lt;div&gt;Windows Vista Business, SP2&lt;/div&gt;&lt;div&gt;IronPython 2.6 (2.6.10920.0) on .NET 2.0.50727.4200&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thanks,&lt;br&gt;Jozef&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;PS:  Duane Kaufman, send similar question :  &lt;a href=&quot;http://lists.ironpython.com/htdig.cgi/users-ironpython.com/2009-June/010693.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/htdig.cgi/users-ironpython.com/2009-June/010693.html&lt;/a&gt;.&lt;/div&gt;

&lt;div&gt;But, no one answer him.  &lt;/div&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26232737&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/What%27s-wrong-with-IronPython-%28UIAutomation%29-tp26232737p26232737.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26228444</id>
	<title>Re: Safe execution of python scripts on my .net application</title>
	<published>2009-11-06T00:35:15Z</published>
	<updated>2009-11-06T00:35:15Z</updated>
	<author>
		<name>Nicolás Buttarelli</name>
	</author>
	<content type="html">Hi,&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Fri, Nov 6, 2009 at 1:07 AM, Dino Viehland &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dinov@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;










&lt;div link=&quot;blue&quot; vlink=&quot;purple&quot; lang=&quot;EN-US&quot;&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;So you’ve run this as a standalone program and it’s failing?  In
the standalone app are all of the IronPython and DLR DLLs present
(IronPython.dll, IronPython.modules.dll, Microsoft.Scripting.Core.dll,
Microsoft.Scripting.dll, Microsoft.Dynamic.dll and Micrsoft.Scripting.Extensionattribute.dll)? 
&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;Yes I have all this dlls present. &lt;br&gt;&lt;/div&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;&lt;div link=&quot;blue&quot; vlink=&quot;purple&quot; lang=&quot;EN-US&quot;&gt;
&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;A slightly modified version of this, dropping the strong name,
works just fine for me:&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;using System;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;using Microsoft.Scripting;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;using Microsoft.Scripting.Hosting;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;using IronPython.Hosting;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;using System.Security;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;using System.Security.Permissions;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;class Test {&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;    public static void Main(string[] args) {&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;im&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;    &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;        PermissionSet aRestrictedPermissionSet = new
PermissionSet(PermissionState.None);&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;        aRestrictedPermissionSet.AddPermission(new
SecurityPermission(SecurityPermissionFlag.Execution));&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;        AppDomainSetup domaininfo = new AppDomainSetup();&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;        domaininfo.ApplicationBase =
System.Environment.CurrentDirectory;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;        AppDomain aSandboxedDomain =
AppDomain.CreateDomain(&amp;quot;Sandboxed Domain&amp;quot;,&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;                  AppDomain.CurrentDomain.Evidence,&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;                  domaininfo,&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;                  aRestrictedPermissionSet);&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;im&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;        ScriptEngine engine =
Python.CreateEngine(aSandboxedDomain);&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;        ScriptSource source =
engine.CreateScriptSourceFromString(&amp;quot;2+2&amp;quot;);&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;        ScriptScope scope = engine.CreateScope();&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;        Console.WriteLine(source.Execute(scope));&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;    }&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;}&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;Great, I will try this after university. Thanks! &lt;br&gt;&lt;/div&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
&lt;div link=&quot;blue&quot; vlink=&quot;purple&quot; lang=&quot;EN-US&quot;&gt;&lt;div&gt;&lt;div class=&quot;im&quot;&gt;

&lt;/div&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;Compile with:&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;csc test.cs /r:Microsoft.Scripting.Core.dll
/r:Microsoft.Scripting.dll /r:IronPython.dll&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;And run and it prints 4.  Does that not work for you?&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;We also have a different way we do this in our test suite which
also works:&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;            AppDomainSetup info = new AppDomainSetup();&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;            info.ApplicationBase =
AppDomain.CurrentDomain.BaseDirectory;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;            info.ApplicationName = &amp;quot;Test&amp;quot;;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;            Evidence evidence = new Evidence();&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;            evidence.AddHost(new Zone(SecurityZone.Internet));&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;            AppDomain newDomain =
AppDomain.CreateDomain(&amp;quot;test&amp;quot;, evidence, info);&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;            &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;            // create runtime in partial trust...&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;            ScriptRuntime runtime = Python.CreateRuntime(newDomain);&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;            // get the Python engine...&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;            ScriptEngine engine =
runtime.GetEngine(&amp;quot;py&amp;quot;);&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;This make sense too, I will try it. Thanks again. &lt;br&gt;&lt;/div&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
&lt;div link=&quot;blue&quot; vlink=&quot;purple&quot; lang=&quot;EN-US&quot;&gt;&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;div style=&quot;border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; border-width: medium medium medium 1.5pt; padding: 0in 0in 0in 4pt;&quot;&gt;

&lt;div&gt;

&lt;div style=&quot;border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;] &lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás
Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Thursday, November 05, 2009 11:18 AM&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Again, thanks everyone for your help.&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;But.. I bring bad news. This is still not working and it
doesn&amp;#39;t depend on the Test environment.&lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;I create another proyect, a Form project, with one button
which executes the following code:&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; // Creating the permission set to grant other
assemblies&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;PermissionSet aRestrictedPermissionSet = new
PermissionSet(PermissionState.None);&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;aRestrictedPermissionSet.AddPermission(new
SecurityPermission(SecurityPermissionFlag.Execution));&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;AppDomainSetup domaininfo = new AppDomainSetup();&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;domaininfo.ApplicationBase =
System.Environment.CurrentDirectory;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;List&amp;lt;StrongName&amp;gt; strongNameList = new
List&amp;lt;StrongName&amp;gt;();&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;strongNameList.Add(CreateStrongName(Assembly.GetExecutingAssembly()));&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;            &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;AppDomain aSandboxedDomain =
AppDomain.CreateDomain(&amp;quot;Sandboxed Domain&amp;quot;,&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;              
                     
                     
                     
         AppDomain.CurrentDomain.Evidence,&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;              
                     
                     
                   
           domaininfo,&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;              
                     
                     
                   
           aRestrictedPermissionSet,&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;              
                     
                     
                   
           strongNameList.ToArray&amp;lt;StrongName&amp;gt;());&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;ScriptEngine engine = Python.CreateEngine(aSandboxedDomain);&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;ScriptSource source =
engine.CreateScriptSourceFromString(pythonScript);&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;ScriptScope scope = engine.CreateScope();&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;source.Execute(scope);&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;It throws this error:&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Type is not resolved for member
&amp;#39;Microsoft.Scripting.Hosting.ScriptRuntimeSetup,Microsoft.Scripting,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&amp;#39;.&lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;I used the &lt;span&gt;&lt;span style=&quot;font-size: 11.5pt; color: rgb(31, 73, 125);&quot;&gt;fuslogvw &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;application to see if the Microsoft.Scripting is loaded, an
it is.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;What seems strange for me is that anyone has tried this
before. I hope to find some more help here.&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Regards,&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Nicolas&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;On Wed, Nov 4, 2009 at 7:36 PM, Shri Borde &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Shri.Borde@...&lt;/a&gt;&amp;gt; wrote:&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;&lt;a href=&quot;http://www.dev102.com/2008/03/22/3-ways-to-run-nunit-from-visual-studio/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.dev102.com/2008/03/22/3-ways-to-run-nunit-from-visual-studio/&lt;/a&gt;
has some info about test projects and appbase problems.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;You can also use fuslogvw (&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/e74a18c4%28VS.71%29.aspx%29&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://msdn.microsoft.com/en-us/library/e74a18c4(VS.71).aspx)&lt;/a&gt;
to see why Microsoft.Scripting.dll is failing to load.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style=&quot;border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Dino Viehland&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Tuesday, November 03, 2009 1:52 PM&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;Test projects are weird and somehow you
don’t end up inheriting the application base.  This seems to work though:&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; 
          AppDomainSetup
setup = new AppDomainSetup();&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;           
setup.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;           
AppDomain aSandboxedDomain = AppDomain.CreateDomain(&amp;quot;Sandboxed
Domain&amp;quot;, null, setup);&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;           
ScriptEngine engine = Python.CreateEngine(aSandboxedDomain);&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;           
ScriptSource source = engine.CreateScriptSourceFromString(&amp;quot;2+2&amp;quot;);&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;           
ScriptScope scope = engine.CreateScope();&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;           
Console.WriteLine(source.Execute(scope));&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;div style=&quot;border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; border-width: medium medium medium 1.5pt; padding: 0in 0in 0in 4pt;&quot;&gt;

&lt;div&gt;

&lt;div style=&quot;border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Tuesday, November 03, 2009 1:30 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;I
have create a new &amp;quot;Test Project&amp;quot; and an Unit Test class in order to
test the following code inside:&lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;AppDomain
aSandboxedDomain = AppDomain.CreateDomain(&amp;quot;Sandboxed Domain&amp;quot;);&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;ScriptEngine
engine = Python.CreateEngine(aSandboxedDomain);&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;ScriptSource
source = engine.CreateScriptSourceFromString(pythonScript);&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;ScriptScope
scope = engine.CreateScope();&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;source.Execute(scope);&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;I
have add the references:&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;-
IronPython&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;-
Microsoft.Scripting&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;-
Microsoft.ScriptingCore&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;But
it still not working and throwing the
same System.Runtime.Serialization.SerializationException: Type is not
resolved for member &amp;#39;Microsoft.Scripting.Hosting.ScriptRuntimeSetup,Microsoft.Scripting.&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Any
ideas?&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;2009/11/3
Nicolás Buttarelli &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;nbuttarelli@...&lt;/a&gt;&amp;gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Thanks
Shri, I will try.&lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;In
addition, I found this open issue: &lt;a href=&quot;http://dlr.codeplex.com/WorkItem/View.aspx?WorkItemId=2816&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://dlr.codeplex.com/WorkItem/View.aspx?WorkItemId=2816&lt;/a&gt;.
I think that it is related.&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 12pt;&quot;&gt; &lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;On
Tue, Nov 3, 2009 at 9:29 PM, Shri Borde &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Shri.Borde@...&lt;/a&gt;&amp;gt;
wrote:&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;I think this happens if the new
appdomain cannot load the required assembly. By default, the new appdomain
should inherit its BaseDirectory property from the creating domain and should
be able to load Microsoft.Scripting.dll. Is your exe and all the dlls in the
same folder? If not, can you try to put all assemblies in the same folder (or
in the GAC) to see if it works? If that works, you can then figure out how to
configure the new appdomain such that it can load Microsoft.Scripting.dll.
There may be some setting in AppDomainSetup, or you could hook the
AssemblyResolve event…&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;div style=&quot;border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Tuesday, November 03, 2009 12:08 PM&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Hi
again, thanks for your clear response.&lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;I
was trying to do what you proposed but it is not working. I am
receiving an exception:&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 12pt;&quot;&gt;&lt;i&gt;Test
method CadworX3WCFRestTest.IronPython.SafeScriptExecutionTest.writingAFileTest
threw exception:  System.Runtime.Serialization.SerializationException:
Type is not resolved for member
&amp;#39;Microsoft.Scripting.Hosting.ScriptRuntimeSetup,Microsoft.Scripting,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&amp;#39;..&lt;/i&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;I
tried to find a solution but I couldn&amp;#39;t. This is the minimal code that I am
running to get this exception (I have removed all the security stuff but
apparently that does not resolve the problem):&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;i&gt;AppDomain
aSandboxedDomain = AppDomain.CreateDomain(&amp;quot;Sandboxed Domain&amp;quot;);&lt;/i&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;i&gt;ScriptEngine
engine = Python.CreateEngine(aSandboxedDomain);&lt;/i&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;i&gt;ScriptSource
source = engine.CreateScriptSourceFromString(pythonScript);&lt;/i&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;i&gt;SriptScope
scope = engine.CreateScope();&lt;/i&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;i&gt;source.Execute(scope);&lt;/i&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;The
exception is thronged in this line: &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;i&gt;ScriptEngine
engine = Python.CreateEngine(aSandboxedDomain);&lt;/i&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Do
you have any idea which could be the problem?&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Thanks
again,&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Nicolas&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;On
Mon, Nov 2, 2009 at 10:25 PM, Dino Viehland &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dinov@...&lt;/a&gt;&amp;gt;
wrote:&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;Assuming the app domain is setup
properly then there’s no way for the Python code to elevate permissions (modulo
CLR security bugs which are few and far between).  This is because IronPython
its self is 100% security transparent and does not affect any security
decisions or assert any form of trust – so it’s all up to the CLR to limit
permissions.  So for example while you can access the file object, or
import ctypes, or call various other Python APIs which would require trust
you’ll get a security exception from the CLR when you don’t have permissions to
do something.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;For more complex scenarios you might
also have an object model which you expose to the application and inject in via
its scope.  Once you’ve done that you’ll want to make sure that the object
model is also secure.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;div style=&quot;border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; border-width: medium medium medium 1.5pt; padding: 0in 0in 0in 4pt;&quot;&gt;

&lt;div&gt;

&lt;div style=&quot;border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Monday, November 02, 2009 1:20 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Thanks
for your response.&lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;But
what happens with the python code? Does not exist a way to write some
scripts that can do some damage to my app, the server, the database, etc?&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Thanks
again,&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Nicolas&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;On
Mon, Nov 2, 2009 at 9:41 PM, Dino Viehland &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dinov@...&lt;/a&gt;&amp;gt;
wrote:&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;After creating your app domain you can
do:&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;ScriptEngine engine =
Python.CreateEngine(someAppDomain);&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;And then the rest of your code should work
as it’s written.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;div style=&quot;border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; border-width: medium medium medium 1.5pt; padding: 0in 0in 0in 4pt;&quot;&gt;

&lt;div&gt;

&lt;div style=&quot;border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=17&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Monday, November 02, 2009 12:39 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=18&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; [IronPython] Safe execution of python scripts on my .net
application&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;Sorry, I don&amp;#39;t know if my previous message have
arrived. So, here it is:&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;Hello all,&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;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. &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;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. &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;In .net I can do this using the AppDoman and setting
the permission set.&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: rgb(51, 51, 51);&quot;&gt;AppDomain.CreateDomain( &lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: rgb(51, 51, 51);&quot;&gt; friendlyName,&lt;br&gt;

                        Evidence
securityInfo,&lt;br&gt;
                        AppDomainSetup
info,&lt;br&gt;
                        PermissionSet
grantSet,&lt;br&gt;
                        &lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;&quot;&gt;params&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: rgb(51, 51, 51);&quot;&gt; StrongName[]
fullTrustAssemblies);&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;Is there a way to do the same with my python
scripts? &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;I am running them using this:&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;ScriptEngine engine = Python.CreateEngine();&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;ScriptSource source = engine.CreateScriptSourceFromString(scriptAsString);&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;ScriptScope scope = engine.CreateScope();&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;source.Execute(scope);&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;Thanks in advance.&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;Nicolas&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 12pt;&quot;&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=19&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 12pt;&quot;&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=20&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 12pt;&quot;&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 12pt;&quot;&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=22&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;


&lt;br&gt;_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=23&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26228444&amp;i=24&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Safe-execution-of-python-scripts-on-my-.net-application-tp26170322p26228444.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26224694</id>
	<title>Re: Safe execution of python scripts on my .net	application</title>
	<published>2009-11-05T16:07:17Z</published>
	<updated>2009-11-05T16:07:17Z</updated>
	<author>
		<name>Dino Viehland</name>
	</author>
	<content type="html">&lt;META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html; charset=iso-8859-1&quot;&gt;
&lt;html xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:x=&quot;urn:schemas-microsoft-com:office:excel&quot; xmlns:p=&quot;urn:schemas-microsoft-com:office:powerpoint&quot; xmlns:a=&quot;urn:schemas-microsoft-com:office:access&quot; xmlns:dt=&quot;uuid:C2F41010-65B3-11d1-A29F-00AA00C14882&quot; xmlns:s=&quot;uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882&quot; xmlns:rs=&quot;urn:schemas-microsoft-com:rowset&quot; xmlns:Z=&quot;urn:schemas-microsoft-com:&quot; xmlns:b=&quot;urn:schemas-microsoft-com:office:publisher&quot; xmlns:ss=&quot;urn:schemas-microsoft-com:office:spreadsheet&quot; xmlns:c=&quot;urn:schemas-microsoft-com:office:component:spreadsheet&quot; xmlns:odc=&quot;urn:schemas-microsoft-com:office:odc&quot; xmlns:oa=&quot;urn:schemas-microsoft-com:office:activation&quot; xmlns:html=&quot;http://www.w3.org/TR/REC-html40&quot; xmlns:q=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:rtc=&quot;http://microsoft.com/officenet/conferencing&quot; xmlns:D=&quot;DAV:&quot; xmlns:Repl=&quot;http://schemas.microsoft.com/repl/&quot; xmlns:mt=&quot;http://schemas.microsoft.com/sharepoint/soap/meetings/&quot; xmlns:x2=&quot;http://schemas.microsoft.com/office/excel/2003/xml&quot; xmlns:ppda=&quot;http://www.passport.com/NameSpace.xsd&quot; xmlns:ois=&quot;http://schemas.microsoft.com/sharepoint/soap/ois/&quot; xmlns:dir=&quot;http://schemas.microsoft.com/sharepoint/soap/directory/&quot; xmlns:ds=&quot;http://www.w3.org/2000/09/xmldsig#&quot; xmlns:dsp=&quot;http://schemas.microsoft.com/sharepoint/dsp&quot; xmlns:udc=&quot;http://schemas.microsoft.com/data/udc&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:sub=&quot;http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/&quot; xmlns:ec=&quot;http://www.w3.org/2001/04/xmlenc#&quot; xmlns:sp=&quot;http://schemas.microsoft.com/sharepoint/&quot; xmlns:sps=&quot;http://schemas.microsoft.com/sharepoint/soap/&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:udcs=&quot;http://schemas.microsoft.com/data/udc/soap&quot; xmlns:udcxf=&quot;http://schemas.microsoft.com/data/udc/xmlfile&quot; xmlns:udcp2p=&quot;http://schemas.microsoft.com/data/udc/parttopart&quot; xmlns:wf=&quot;http://schemas.microsoft.com/sharepoint/soap/workflow/&quot; xmlns:dsss=&quot;http://schemas.microsoft.com/office/2006/digsig-setup&quot; xmlns:dssi=&quot;http://schemas.microsoft.com/office/2006/digsig&quot; xmlns:mdssi=&quot;http://schemas.openxmlformats.org/package/2006/digital-signature&quot; xmlns:mver=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot; xmlns:m=&quot;http://schemas.microsoft.com/office/2004/12/omml&quot; xmlns:mrels=&quot;http://schemas.openxmlformats.org/package/2006/relationships&quot; xmlns:spwp=&quot;http://microsoft.com/sharepoint/webpartpages&quot; xmlns:ex12t=&quot;http://schemas.microsoft.com/exchange/services/2006/types&quot; xmlns:ex12m=&quot;http://schemas.microsoft.com/exchange/services/2006/messages&quot; xmlns:pptsl=&quot;http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/&quot; xmlns:spsl=&quot;http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService&quot; xmlns:st=&quot;&amp;#1;&quot; xmlns=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;

&lt;head&gt;

&lt;meta name=Generator content=&quot;Microsoft Word 12 (filtered medium)&quot;&gt;

&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext=&quot;edit&quot; spidmax=&quot;1026&quot; /&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext=&quot;edit&quot;&gt;
  &lt;o:idmap v:ext=&quot;edit&quot; data=&quot;1&quot; /&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;
&lt;/head&gt;

&lt;body lang=EN-US link=blue vlink=purple&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;So you&amp;#8217;ve run this as a standalone program and it&amp;#8217;s failing?  In
the standalone app are all of the IronPython and DLR DLLs present
(IronPython.dll, IronPython.modules.dll, Microsoft.Scripting.Core.dll,
Microsoft.Scripting.dll, Microsoft.Dynamic.dll and Micrsoft.Scripting.Extensionattribute.dll)? 
&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;A slightly modified version of this, dropping the strong name,
works just fine for me:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;using System;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;using Microsoft.Scripting;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;using Microsoft.Scripting.Hosting;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;using IronPython.Hosting;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;using System.Security;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;using System.Security.Permissions;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;class Test {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;    public static void Main(string[] args) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;    &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;        PermissionSet aRestrictedPermissionSet = new
PermissionSet(PermissionState.None);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;        aRestrictedPermissionSet.AddPermission(new
SecurityPermission(SecurityPermissionFlag.Execution));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;        AppDomainSetup domaininfo = new AppDomainSetup();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;        domaininfo.ApplicationBase =
System.Environment.CurrentDirectory;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;        AppDomain aSandboxedDomain =
AppDomain.CreateDomain(&amp;quot;Sandboxed Domain&amp;quot;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;                  AppDomain.CurrentDomain.Evidence,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;                  domaininfo,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;                  aRestrictedPermissionSet);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;        ScriptEngine engine =
Python.CreateEngine(aSandboxedDomain);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;        ScriptSource source =
engine.CreateScriptSourceFromString(&amp;quot;2+2&amp;quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;        ScriptScope scope = engine.CreateScope();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;        Console.WriteLine(source.Execute(scope));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;    }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;Compile with:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;csc test.cs /r:Microsoft.Scripting.Core.dll
/r:Microsoft.Scripting.dll /r:IronPython.dll&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;And run and it prints 4.  Does that not work for you?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;We also have a different way we do this in our test suite which
also works:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;            AppDomainSetup info = new AppDomainSetup();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;            info.ApplicationBase =
AppDomain.CurrentDomain.BaseDirectory;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;            info.ApplicationName = &amp;quot;Test&amp;quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;            Evidence evidence = new Evidence();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;            evidence.AddHost(new Zone(SecurityZone.Internet));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;            AppDomain newDomain =
AppDomain.CreateDomain(&amp;quot;test&amp;quot;, evidence, info);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;            &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;            // create runtime in partial trust...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;            ScriptRuntime runtime = Python.CreateRuntime(newDomain);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;            // get the Python engine...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;            ScriptEngine engine =
runtime.GetEngine(&amp;quot;py&amp;quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224694&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224694&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;] &lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás
Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Thursday, November 05, 2009 11:18 AM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;Again, thanks everyone for your help.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;But.. I bring bad news. This is still not working and it
doesn't depend on the Test environment.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;I create another proyect, a Form project, with one button
which executes the following code:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;// Creating the permission set to grant other
assemblies&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;PermissionSet aRestrictedPermissionSet = new
PermissionSet(PermissionState.None);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;aRestrictedPermissionSet.AddPermission(new
SecurityPermission(SecurityPermissionFlag.Execution));&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;AppDomainSetup domaininfo = new AppDomainSetup();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;domaininfo.ApplicationBase =
System.Environment.CurrentDirectory;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;List&amp;lt;StrongName&amp;gt; strongNameList = new
List&amp;lt;StrongName&amp;gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;strongNameList.Add(CreateStrongName(Assembly.GetExecutingAssembly()));&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;AppDomain aSandboxedDomain =
AppDomain.CreateDomain(&amp;quot;Sandboxed Domain&amp;quot;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AppDomain.CurrentDomain.Evidence,&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;domaininfo,&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;aRestrictedPermissionSet,&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;strongNameList.ToArray&amp;lt;StrongName&amp;gt;());&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;ScriptEngine engine = Python.CreateEngine(aSandboxedDomain);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;ScriptSource source =
engine.CreateScriptSourceFromString(pythonScript);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;ScriptScope scope = engine.CreateScope();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;source.Execute(scope);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;It throws this error:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;Type is not resolved for member
'Microsoft.Scripting.Hosting.ScriptRuntimeSetup,Microsoft.Scripting,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;I used the&amp;nbsp;&lt;span class=apple-style-span&gt;&lt;span style='font-size:11.5pt;color:#1F497D'&gt;fuslogvw&amp;nbsp;&lt;/span&gt;&lt;span style='color:black'&gt;application to see if the Microsoft.Scripting is loaded, an
it is.&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;What seems strange for me is that anyone has tried this
before. I hope to find some more help here.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;Regards,&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;Nicolas&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;On Wed, Nov 4, 2009 at 7:36 PM, Shri Borde &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224694&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Shri.Borde@...&lt;/a&gt;&amp;gt; wrote:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&lt;a href=&quot;http://www.dev102.com/2008/03/22/3-ways-to-run-nunit-from-visual-studio/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.dev102.com/2008/03/22/3-ways-to-run-nunit-from-visual-studio/&lt;/a&gt;
has some info about test projects and appbase problems.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;You can also use fuslogvw (&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/e74a18c4(VS.71).aspx)&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://msdn.microsoft.com/en-us/library/e74a18c4(VS.71).aspx)&lt;/a&gt;
to see why Microsoft.Scripting.dll is failing to load.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224694&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224694&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Dino Viehland&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Tuesday, November 03, 2009 1:52 PM&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;Test projects are weird and somehow you
don&amp;#8217;t end up inheriting the application base.&amp;nbsp; This seems to work though:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AppDomainSetup
setup = new AppDomainSetup();&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
setup.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
AppDomain aSandboxedDomain = AppDomain.CreateDomain(&amp;quot;Sandboxed
Domain&amp;quot;, null, setup);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
ScriptEngine engine = Python.CreateEngine(aSandboxedDomain);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
ScriptSource source = engine.CreateScriptSourceFromString(&amp;quot;2+2&amp;quot;);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
ScriptScope scope = engine.CreateScope();&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Console.WriteLine(source.Execute(scope));&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224694&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224694&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Tuesday, November 03, 2009 1:30 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;I
have create a new &amp;quot;Test Project&amp;quot; and an Unit Test class in order to
test the following code inside:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;AppDomain
aSandboxedDomain = AppDomain.CreateDomain(&amp;quot;Sandboxed Domain&amp;quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;ScriptEngine
engine = Python.CreateEngine(aSandboxedDomain);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;ScriptSource
source = engine.CreateScriptSourceFromString(pythonScript);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;ScriptScope
scope = engine.CreateScope();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;source.Execute(scope);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;I
have add the references:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;-
IronPython&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;-
Microsoft.Scripting&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;-
Microsoft.ScriptingCore&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;But
it still not working and&amp;nbsp;throwing&amp;nbsp;the
same&amp;nbsp;System.Runtime.Serialization.SerializationException: Type is not
resolved for member 'Microsoft.Scripting.Hosting.ScriptRuntimeSetup,Microsoft.Scripting.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Any
ideas?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;2009/11/3
Nicolás Buttarelli &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224694&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;nbuttarelli@...&lt;/a&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Thanks
Shri, I will try.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;In
addition, I found this open issue:&amp;nbsp;&lt;a href=&quot;http://dlr.codeplex.com/WorkItem/View.aspx?WorkItemId=2816&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://dlr.codeplex.com/WorkItem/View.aspx?WorkItemId=2816&lt;/a&gt;.
I think that it is related.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;On
Tue, Nov 3, 2009 at 9:29 PM, Shri Borde &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224694&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Shri.Borde@...&lt;/a&gt;&amp;gt;
wrote:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;I think this happens if the new
appdomain cannot load the required assembly. By default, the new appdomain
should inherit its BaseDirectory property from the creating domain and should
be able to load Microsoft.Scripting.dll. Is your exe and all the dlls in the
same folder? If not, can you try to put all assemblies in the same folder (or
in the GAC) to see if it works? If that works, you can then figure out how to
configure the new appdomain such that it can load Microsoft.Scripting.dll.
There may be some setting in AppDomainSetup, or you could hook the
AssemblyResolve event&amp;#8230;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224694&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224694&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Tuesday, November 03, 2009 12:08 PM&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Hi
again, thanks for your clear response.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;I
was trying to do what you&amp;nbsp;proposed&amp;nbsp;but it is not working. I am
receiving an exception:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'&gt;&lt;i&gt;Test
method CadworX3WCFRestTest.IronPython.SafeScriptExecutionTest.writingAFileTest
threw exception: &amp;nbsp;System.Runtime.Serialization.SerializationException:
Type is not resolved for member
'Microsoft.Scripting.Hosting.ScriptRuntimeSetup,Microsoft.Scripting,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'..&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;I
tried to find a solution but I couldn't. This is the minimal code that I am
running to get this exception (I have removed all the security stuff but
apparently that does not resolve the problem):&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;i&gt;AppDomain
aSandboxedDomain = AppDomain.CreateDomain(&amp;quot;Sandboxed Domain&amp;quot;);&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;i&gt;ScriptEngine
engine = Python.CreateEngine(aSandboxedDomain);&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;i&gt;ScriptSource
source = engine.CreateScriptSourceFromString(pythonScript);&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;i&gt;SriptScope
scope = engine.CreateScope();&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;i&gt;source.Execute(scope);&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;The
exception is&amp;nbsp;thronged in this line:&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;i&gt;ScriptEngine
engine = Python.CreateEngine(aSandboxedDomain);&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Do
you have any idea which could be the problem?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Thanks
again,&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Nicolas&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;On
Mon, Nov 2, 2009 at 10:25 PM, Dino Viehland &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224694&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dinov@...&lt;/a&gt;&amp;gt;
wrote:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;Assuming the app domain is setup
properly then there&amp;#8217;s no way for the Python code to elevate permissions (modulo
CLR security bugs which are few and far between).&amp;nbsp; This is because IronPython
its self is 100% security transparent and does not affect any security
decisions or assert any form of trust &amp;#8211; so it&amp;#8217;s all up to the CLR to limit
permissions.&amp;nbsp; So for example while you can access the file object, or
import ctypes, or call various other Python APIs which would require trust
you&amp;#8217;ll get a security exception from the CLR when you don&amp;#8217;t have permissions to
do something.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;For more complex scenarios you might
also have an object model which you expose to the application and inject in via
its scope.&amp;nbsp; Once you&amp;#8217;ve done that you&amp;#8217;ll want to make sure that the object
model is also secure.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224694&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224694&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Monday, November 02, 2009 1:20 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Thanks
for your response.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;But
what happens with the python code? Does not exist a&amp;nbsp;way to write some
scripts that can do some damage to my app, the server, the database, etc?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Thanks
again,&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Nicolas&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;On
Mon, Nov 2, 2009 at 9:41 PM, Dino Viehland &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224694&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dinov@...&lt;/a&gt;&amp;gt;
wrote:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;After creating your app domain you can
do:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;ScriptEngine engine =
Python.CreateEngine(someAppDomain);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;And then the rest of your code should work
as it&amp;#8217;s written.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224694&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224694&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Monday, November 02, 2009 12:39 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224694&amp;i=17&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; [IronPython] Safe execution of python scripts on my .net
application&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;Sorry, I don't know if my previous message have
arrived. So, here it is:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;Hello all,&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;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.&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;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.&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;In .net I can do this using the AppDoman and setting
the permission set.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#333333'&gt;AppDomain.CreateDomain(&amp;nbsp;&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;string&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#333333'&gt;&amp;nbsp;friendlyName,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Evidence
securityInfo,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AppDomainSetup
info,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PermissionSet
grantSet,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;params&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#333333'&gt;&amp;nbsp;StrongName[]
fullTrustAssemblies);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;Is there a way to do the same with my python
scripts?&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;I am running them using this:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;ScriptEngine engine = Python.CreateEngine();&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;ScriptSource source = engine.CreateScriptSourceFromString(scriptAsString);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;ScriptScope scope = engine.CreateScope();&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;source.Execute(scope);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;Thanks in advance.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;Nicolas&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224694&amp;i=18&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224694&amp;i=19&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224694&amp;i=20&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='margin-bottom:12.0pt'&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224694&amp;i=21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224694&amp;i=22&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Safe-execution-of-python-scripts-on-my-.net-application-tp26170322p26224694.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26220719</id>
	<title>Re: Safe execution of python scripts on my .net application</title>
	<published>2009-11-05T11:17:38Z</published>
	<updated>2009-11-05T11:17:38Z</updated>
	<author>
		<name>Nicolás Buttarelli</name>
	</author>
	<content type="html">&lt;div&gt;Again, thanks everyone for your help.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;But.. I bring bad news. This is still not working and it doesn&amp;#39;t depend on the Test environment.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I create another proyect, a Form project, with one button which executes the following code:&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt; // Creating the permission set to grant other assemblies&lt;/div&gt;&lt;div&gt;PermissionSet aRestrictedPermissionSet = new PermissionSet(PermissionState.None);&lt;/div&gt;&lt;div&gt;aRestrictedPermissionSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.Execution));&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;AppDomainSetup domaininfo = new AppDomainSetup();&lt;/div&gt;&lt;div&gt;domaininfo.ApplicationBase = System.Environment.CurrentDirectory;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;List&amp;lt;StrongName&amp;gt; strongNameList = new List&amp;lt;StrongName&amp;gt;();&lt;/div&gt;
&lt;div&gt;strongNameList.Add(CreateStrongName(Assembly.GetExecutingAssembly()));&lt;/div&gt;&lt;div&gt;            &lt;/div&gt;&lt;div&gt;AppDomain aSandboxedDomain = AppDomain.CreateDomain(&amp;quot;Sandboxed Domain&amp;quot;,&lt;/div&gt;&lt;div&gt;                                                                                          AppDomain.CurrentDomain.Evidence,&lt;/div&gt;
&lt;div&gt;                                                                                          domaininfo,&lt;/div&gt;&lt;div&gt;                                                                                          aRestrictedPermissionSet,&lt;/div&gt;
&lt;div&gt;                                                                                          strongNameList.ToArray&amp;lt;StrongName&amp;gt;());&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;ScriptEngine engine = Python.CreateEngine(aSandboxedDomain);&lt;/div&gt;
&lt;div&gt;ScriptSource source = engine.CreateScriptSourceFromString(pythonScript);&lt;/div&gt;&lt;div&gt;ScriptScope scope = engine.CreateScope();&lt;/div&gt;&lt;div&gt;source.Execute(scope);&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;It throws this error:&lt;/div&gt;
&lt;div&gt;Type is not resolved for member &amp;#39;Microsoft.Scripting.Hosting.ScriptRuntimeSetup,Microsoft.Scripting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&amp;#39;.&lt;br&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I used the &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; color: rgb(31, 73, 125); &quot;&gt;fuslogvw &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-size: small; &quot;&gt;application to see if the Microsoft.Scripting is loaded, an it is.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;What seems strange for me is that anyone has tried this before. I hope to find some more help here.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Regards,&lt;/div&gt;&lt;div&gt;Nicolas&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;
On Wed, Nov 4, 2009 at 7:36 PM, Shri Borde &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220719&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Shri.Borde@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;










&lt;div lang=&quot;EN-US&quot; link=&quot;blue&quot; vlink=&quot;purple&quot;&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt;&lt;a href=&quot;http://www.dev102.com/2008/03/22/3-ways-to-run-nunit-from-visual-studio/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.dev102.com/2008/03/22/3-ways-to-run-nunit-from-visual-studio/&lt;/a&gt;
has some info about test projects and appbase problems.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt;You can also use fuslogvw (&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/e74a18c4(VS.71).aspx)&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://msdn.microsoft.com/en-us/library/e74a18c4(VS.71).aspx)&lt;/a&gt;
to see why Microsoft.Scripting.dll is failing to load.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style=&quot;border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220719&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220719&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;] &lt;b&gt;On
Behalf Of &lt;/b&gt;Dino Viehland&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Tuesday, November 03, 2009 1:52 PM&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt;Test projects are weird and somehow you don’t end up inheriting
the application base.  This seems to work though:&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt; 
          AppDomainSetup
setup = new AppDomainSetup();&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt;           
setup.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt;           
AppDomain aSandboxedDomain = AppDomain.CreateDomain(&amp;quot;Sandboxed
Domain&amp;quot;, null, setup);&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt;           
ScriptEngine engine = Python.CreateEngine(aSandboxedDomain);&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt;           
ScriptSource source = engine.CreateScriptSourceFromString(&amp;quot;2+2&amp;quot;);&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt;           
ScriptScope scope = engine.CreateScope();&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt;           
Console.WriteLine(source.Execute(scope));&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;div style=&quot;border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt&quot;&gt;

&lt;div&gt;

&lt;div style=&quot;border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220719&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220719&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;] &lt;b&gt;On
Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Tuesday, November 03, 2009 1:30 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;I have create a new &amp;quot;Test Project&amp;quot; and an Unit
Test class in order to test the following code inside:&lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;AppDomain aSandboxedDomain = AppDomain.CreateDomain(&amp;quot;Sandboxed
Domain&amp;quot;);&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;ScriptEngine engine = Python.CreateEngine(aSandboxedDomain);&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;ScriptSource source =
engine.CreateScriptSourceFromString(pythonScript);&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;ScriptScope scope = engine.CreateScope();&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;source.Execute(scope);&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;I have add the references:&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;- IronPython&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;- Microsoft.Scripting&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;- Microsoft.ScriptingCore&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;But it still not working and throwing the
same System.Runtime.Serialization.SerializationException: Type is not
resolved for member
&amp;#39;Microsoft.Scripting.Hosting.ScriptRuntimeSetup,Microsoft.Scripting.&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Any ideas?&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;2009/11/3 Nicolás Buttarelli &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220719&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;nbuttarelli@...&lt;/a&gt;&amp;gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Thanks Shri, I will try.&lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;In addition, I found this open issue: &lt;a href=&quot;http://dlr.codeplex.com/WorkItem/View.aspx?WorkItemId=2816&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://dlr.codeplex.com/WorkItem/View.aspx?WorkItemId=2816&lt;/a&gt;.
I think that it is related.&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom:12.0pt&quot;&gt; &lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;On Tue, Nov 3, 2009 at 9:29 PM, Shri Borde &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220719&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Shri.Borde@...&lt;/a&gt;&amp;gt;
wrote:&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt;I think this happens if the new
appdomain cannot load the required assembly. By default, the new appdomain
should inherit its BaseDirectory property from the creating domain and should
be able to load Microsoft.Scripting.dll. Is your exe and all the dlls in the
same folder? If not, can you try to put all assemblies in the same folder (or
in the GAC) to see if it works? If that works, you can then figure out how to
configure the new appdomain such that it can load Microsoft.Scripting.dll.
There may be some setting in AppDomainSetup, or you could hook the
AssemblyResolve event…&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;div style=&quot;border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220719&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220719&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Tuesday, November 03, 2009 12:08 PM&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Hi
again, thanks for your clear response.&lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;I
was trying to do what you proposed but it is not working. I am
receiving an exception:&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom:12.0pt&quot;&gt;&lt;i&gt;Test
method CadworX3WCFRestTest.IronPython.SafeScriptExecutionTest.writingAFileTest
threw exception:  System.Runtime.Serialization.SerializationException:
Type is not resolved for member
&amp;#39;Microsoft.Scripting.Hosting.ScriptRuntimeSetup,Microsoft.Scripting,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&amp;#39;..&lt;/i&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;I
tried to find a solution but I couldn&amp;#39;t. This is the minimal code that I am
running to get this exception (I have removed all the security stuff but
apparently that does not resolve the problem):&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;i&gt;AppDomain
aSandboxedDomain = AppDomain.CreateDomain(&amp;quot;Sandboxed Domain&amp;quot;);&lt;/i&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;i&gt;ScriptEngine
engine = Python.CreateEngine(aSandboxedDomain);&lt;/i&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;i&gt;ScriptSource
source = engine.CreateScriptSourceFromString(pythonScript);&lt;/i&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;i&gt;SriptScope
scope = engine.CreateScope();&lt;/i&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;i&gt;source.Execute(scope);&lt;/i&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;The
exception is thronged in this line: &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;i&gt;ScriptEngine
engine = Python.CreateEngine(aSandboxedDomain);&lt;/i&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Do
you have any idea which could be the problem?&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Thanks
again,&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Nicolas&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;On
Mon, Nov 2, 2009 at 10:25 PM, Dino Viehland &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220719&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dinov@...&lt;/a&gt;&amp;gt;
wrote:&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt;Assuming the app domain is setup
properly then there’s no way for the Python code to elevate permissions (modulo
CLR security bugs which are few and far between).  This is because
IronPython its self is 100% security transparent and does not affect any security
decisions or assert any form of trust – so it’s all up to the CLR to limit
permissions.  So for example while you can access the file object, or
import ctypes, or call various other Python APIs which would require trust
you’ll get a security exception from the CLR when you don’t have permissions to
do something.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt;For more complex scenarios you might
also have an object model which you expose to the application and inject in via
its scope.  Once you’ve done that you’ll want to make sure that the object
model is also secure.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;div style=&quot;border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt&quot;&gt;

&lt;div&gt;

&lt;div style=&quot;border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220719&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220719&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Monday, November 02, 2009 1:20 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Thanks
for your response.&lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;But
what happens with the python code? Does not exist a way to write some
scripts that can do some damage to my app, the server, the database, etc?&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Thanks
again,&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Nicolas&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;On
Mon, Nov 2, 2009 at 9:41 PM, Dino Viehland &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220719&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dinov@...&lt;/a&gt;&amp;gt;
wrote:&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt;After creating your app domain you can
do:&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt;ScriptEngine engine =
Python.CreateEngine(someAppDomain);&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt;And then the rest of your code should
work as it’s written.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:11.0pt;color:#1F497D&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;div style=&quot;border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt&quot;&gt;

&lt;div&gt;

&lt;div style=&quot;border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220719&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220719&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Monday, November 02, 2009 12:39 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220719&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; [IronPython] Safe execution of python scripts on my .net
application&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt;Sorry, I don&amp;#39;t know if my previous message have
arrived. So, here it is:&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt;Hello all,&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt;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. &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt;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. &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt;In .net I can do this using the AppDoman and setting
the permission set.&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Courier New&amp;quot;;color:#333333&quot;&gt;AppDomain.CreateDomain( &lt;/span&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Courier New&amp;quot;;color:blue&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Courier New&amp;quot;;color:#333333&quot;&gt; friendlyName,&lt;br&gt;

                        Evidence
securityInfo,&lt;br&gt;
                        AppDomainSetup
info,&lt;br&gt;
                        PermissionSet
grantSet,&lt;br&gt;
                        &lt;/span&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Courier New&amp;quot;;color:blue&quot;&gt;params&lt;/span&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Courier New&amp;quot;;color:#333333&quot;&gt; StrongName[]
fullTrustAssemblies);&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt;Is there a way to do the same with my python
scripts? &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt;I am running them using this:&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt;ScriptEngine engine = Python.CreateEngine();&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt;ScriptSource source =
engine.CreateScriptSourceFromString(scriptAsString);&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt;ScriptScope scope = engine.CreateScope();&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt;source.Execute(scope);&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt;Thanks in advance.&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt&quot;&gt;Nicolas&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom:12.0pt&quot;&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220719&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom:12.0pt&quot;&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220719&amp;i=17&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom:12.0pt&quot;&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220719&amp;i=18&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;

&lt;/div&gt;


&lt;br&gt;_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220719&amp;i=19&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220719&amp;i=20&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Safe-execution-of-python-scripts-on-my-.net-application-tp26170322p26220719.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26220673</id>
	<title>Re: Embedded IronPython 2.6 Module Name</title>
	<published>2009-11-05T11:14:31Z</published>
	<updated>2009-11-05T11:14:31Z</updated>
	<author>
		<name>Jonathan Howard</name>
	</author>
	<content type="html">Thanks for the help, Curt.  Perhaps it&amp;#39;s a problem with the latest, RC?  There is no &amp;quot;CreateModule&amp;quot; function on the PythonContext object.
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;~Jonathan&lt;/div&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220673&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Embedded-IronPython-2.6-Module-Name-tp26219428p26220673.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26220155</id>
	<title>Re: Embedded IronPython 2.6 Module Name</title>
	<published>2009-11-05T10:45:19Z</published>
	<updated>2009-11-05T10:45:19Z</updated>
	<author>
		<name>Curt Hagenlocher</name>
	</author>
	<content type="html">&lt;div&gt;I&amp;#39;m not sure if there&amp;#39;s a simpler way -- here&amp;#39;s what I did a few months back when I needed to publish something via __main__:&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;pythonContext = HostingHelpers.GetLanguageContext(self._engine)&lt;/div&gt;
&lt;div&gt;module = pythonContext.CreateModule()&lt;br&gt;pythonContext.PublishModule(&amp;#39;__main__&amp;#39;, module)&lt;br&gt;scope = HostingHelpers.CreateScriptScope(self._engine, module.Scope)&lt;br&gt;scope.SetVariable(&amp;#39;__name__&amp;#39;, &amp;#39;__main__&amp;#39;)&lt;br&gt;
scope.SetVariable(&amp;#39;__doc__&amp;#39;, &amp;#39;&amp;#39;)&lt;br&gt;&lt;br&gt;HostingHelpers is a class in the DLR hosting interfaces. From C#, you&amp;#39;d need to explicitly cast the LanguageContext to a PythonContext.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;After this, you would run your Python code within the &amp;quot;scope&amp;quot; ScriptScope.&lt;br&gt;&lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Nov 5, 2009 at 10:57 AM, Jonathan Howard &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220155&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jhoward@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;Hi, 
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;We&amp;#39;re trying to upgrade to IronPython 2.6 and are having a number of issues with it.  The biggest issue is there doesn&amp;#39;t appear to be a way to name the module that runs when you embed your code.  We&amp;#39;re using the Hosting API to create and run code within C#.  The code runs, but we have other modules that are supposed to pull globals from the __main__ module.  This worked in 1.1 by setting the DefaultModule on the PythonEngine instance.  There doesn&amp;#39;t seem to be a way to do this anymore.&lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;Any help would be appreciated.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;font color=&quot;#888888&quot;&gt;
&lt;div&gt;~Jonathan&lt;/div&gt;&lt;/font&gt;&lt;br&gt;_______________________________________________&lt;br&gt;Users mailing list&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220155&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220155&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Embedded-IronPython-2.6-Module-Name-tp26219428p26220155.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26220064</id>
	<title>Re: Embedded IronPython 2.6 Module Name</title>
	<published>2009-11-05T10:38:51Z</published>
	<updated>2009-11-05T10:38:51Z</updated>
	<author>
		<name>Jonathan Howard</name>
	</author>
	<content type="html">Looking further into this, it appears that __name__ is always set to &amp;lt;module&amp;gt;. This is the behavior while trying to just use:
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Dictionary&amp;lt;string, object&amp;gt; options = new Dictionary&amp;lt;string, object&amp;gt;();&lt;/div&gt;&lt;div&gt;ScriptEngine se = Python.CreateEngine();&lt;/div&gt;&lt;div&gt;Console.WriteLine(se.Execute&amp;lt;string&amp;gt;(&amp;quot;__name__&amp;quot;));&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;~Jonathan&lt;/div&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26220064&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Embedded-IronPython-2.6-Module-Name-tp26219428p26220064.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26219428</id>
	<title>Embedded IronPython 2.6 Module Name</title>
	<published>2009-11-05T09:57:28Z</published>
	<updated>2009-11-05T09:57:28Z</updated>
	<author>
		<name>Jonathan Howard</name>
	</author>
	<content type="html">Hi,&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;We&amp;#39;re trying to upgrade to IronPython 2.6 and are having a number of issues with it.  The biggest issue is there doesn&amp;#39;t appear to be a way to name the module that runs when you embed your code.  We&amp;#39;re using the Hosting API to create and run code within C#.  The code runs, but we have other modules that are supposed to pull globals from the __main__ module.  This worked in 1.1 by setting the DefaultModule on the PythonEngine instance.  There doesn&amp;#39;t seem to be a way to do this anymore.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Any help would be appreciated.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;~Jonathan&lt;/div&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26219428&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Embedded-IronPython-2.6-Module-Name-tp26219428p26219428.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26204652</id>
	<title>Re: Reproducing an C# array of floats</title>
	<published>2009-11-04T13:08:27Z</published>
	<updated>2009-11-04T13:08:27Z</updated>
	<author>
		<name>Daniel D.-3</name>
	</author>
	<content type="html">&lt;html&gt;
&lt;head&gt;

&lt;/head&gt;
&lt;body class='hmmessage'&gt;
&lt;span style=&quot;font-size: 10pt; font-family: 'Verdana','sans-serif';&quot;&gt;&lt;/span&gt;&lt;br&gt;









&lt;span style=&quot;font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);&quot;&gt;Ahh, read is a generic method and you’re getting type inference
from C# but not IronPython.&amp;nbsp; IronPython 2.6 includes type inference on generic
methods so this might just work there, but otherwise I think you can do:&lt;/span&gt;&lt;div class=&quot;ecxSection1&quot;&gt;

&lt;p class=&quot;ecxMsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;ecxMsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Verdana','sans-serif';&quot;&gt;print
buffer.Read[Single](sample, 0, True)&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;ecxMsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Verdana','sans-serif';&quot;&gt;&lt;br&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;ecxMsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Verdana','sans-serif';&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;ecxMsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Verdana','sans-serif';&quot;&gt;worked perfectly! thank you so much dino.&lt;/span&gt;&lt;br&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Verdana','sans-serif';&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;ecxMsoNormal&quot;&gt;&lt;br&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Verdana','sans-serif';&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;ecxMsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Verdana','sans-serif';&quot;&gt;&lt;br&gt;&lt;/span&gt;&lt;/p&gt;&lt;br&gt;&lt;/div&gt; 		 	   		  &lt;br /&gt;&lt;hr /&gt;Windows Live: Keep your friends up to date &lt;a href='http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_1:092010' target='_new' rel=&quot;nofollow&quot;&gt;with what you do online.&lt;/a&gt;&lt;/body&gt;
&lt;/html&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26204652&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reproducing-an-C--array-of-floats-tp26203853p26204652.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26204525</id>
	<title>Re: Reproducing an C# array of floats</title>
	<published>2009-11-04T12:58:43Z</published>
	<updated>2009-11-04T12:58:43Z</updated>
	<author>
		<name>Dino Viehland</name>
	</author>
	<content type="html">&lt;html xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:x=&quot;urn:schemas-microsoft-com:office:excel&quot; xmlns:p=&quot;urn:schemas-microsoft-com:office:powerpoint&quot; xmlns:a=&quot;urn:schemas-microsoft-com:office:access&quot; xmlns:dt=&quot;uuid:C2F41010-65B3-11d1-A29F-00AA00C14882&quot; xmlns:s=&quot;uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882&quot; xmlns:rs=&quot;urn:schemas-microsoft-com:rowset&quot; xmlns:Z=&quot;urn:schemas-microsoft-com:&quot; xmlns:b=&quot;urn:schemas-microsoft-com:office:publisher&quot; xmlns:ss=&quot;urn:schemas-microsoft-com:office:spreadsheet&quot; xmlns:c=&quot;urn:schemas-microsoft-com:office:component:spreadsheet&quot; xmlns:odc=&quot;urn:schemas-microsoft-com:office:odc&quot; xmlns:oa=&quot;urn:schemas-microsoft-com:office:activation&quot; xmlns:html=&quot;http://www.w3.org/TR/REC-html40&quot; xmlns:q=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:rtc=&quot;http://microsoft.com/officenet/conferencing&quot; xmlns:D=&quot;DAV:&quot; xmlns:Repl=&quot;http://schemas.microsoft.com/repl/&quot; xmlns:mt=&quot;http://schemas.microsoft.com/sharepoint/soap/meetings/&quot; xmlns:x2=&quot;http://schemas.microsoft.com/office/excel/2003/xml&quot; xmlns:ppda=&quot;http://www.passport.com/NameSpace.xsd&quot; xmlns:ois=&quot;http://schemas.microsoft.com/sharepoint/soap/ois/&quot; xmlns:dir=&quot;http://schemas.microsoft.com/sharepoint/soap/directory/&quot; xmlns:ds=&quot;http://www.w3.org/2000/09/xmldsig#&quot; xmlns:dsp=&quot;http://schemas.microsoft.com/sharepoint/dsp&quot; xmlns:udc=&quot;http://schemas.microsoft.com/data/udc&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:sub=&quot;http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/&quot; xmlns:ec=&quot;http://www.w3.org/2001/04/xmlenc#&quot; xmlns:sp=&quot;http://schemas.microsoft.com/sharepoint/&quot; xmlns:sps=&quot;http://schemas.microsoft.com/sharepoint/soap/&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:udcs=&quot;http://schemas.microsoft.com/data/udc/soap&quot; xmlns:udcxf=&quot;http://schemas.microsoft.com/data/udc/xmlfile&quot; xmlns:udcp2p=&quot;http://schemas.microsoft.com/data/udc/parttopart&quot; xmlns:wf=&quot;http://schemas.microsoft.com/sharepoint/soap/workflow/&quot; xmlns:dsss=&quot;http://schemas.microsoft.com/office/2006/digsig-setup&quot; xmlns:dssi=&quot;http://schemas.microsoft.com/office/2006/digsig&quot; xmlns:mdssi=&quot;http://schemas.openxmlformats.org/package/2006/digital-signature&quot; xmlns:mver=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot; xmlns:m=&quot;http://schemas.microsoft.com/office/2004/12/omml&quot; xmlns:mrels=&quot;http://schemas.openxmlformats.org/package/2006/relationships&quot; xmlns:spwp=&quot;http://microsoft.com/sharepoint/webpartpages&quot; xmlns:ex12t=&quot;http://schemas.microsoft.com/exchange/services/2006/types&quot; xmlns:ex12m=&quot;http://schemas.microsoft.com/exchange/services/2006/messages&quot; xmlns:pptsl=&quot;http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/&quot; xmlns:spsl=&quot;http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService&quot; xmlns:st=&quot;&amp;#1;&quot; xmlns=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;

&lt;head&gt;
&lt;META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html; charset=us-ascii&quot;&gt;
&lt;meta name=Generator content=&quot;Microsoft Word 12 (filtered medium)&quot;&gt;
&lt;!--[if !mso]&gt;
&lt;style&gt;
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext=&quot;edit&quot; spidmax=&quot;1026&quot; /&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext=&quot;edit&quot;&gt;
  &lt;o:idmap v:ext=&quot;edit&quot; data=&quot;1&quot; /&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;
&lt;/head&gt;

&lt;body lang=EN-US link=blue vlink=purple&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;Ahh, read is a generic method and you&amp;#8217;re getting type inference
from C# but not IronPython.&amp;nbsp; IronPython 2.6 includes type inference on generic
methods so this might just work there, but otherwise I think you can do:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;print
buffer.Read[Single](sample, 0, True)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;The
square brackets are how we specifiy generic type parameters.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26204525&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26204525&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;] &lt;b&gt;On
Behalf Of &lt;/b&gt;Daniel D.&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Wednesday, November 04, 2009 12:48 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26204525&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Reproducing an C# array of floats&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='margin-bottom:12.0pt'&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;Hi Dino, thanks for the quick reply.&lt;br&gt;
&lt;br&gt;
Now I'm using System.Single instead float but the error persists.&lt;br&gt;
&lt;br&gt;
For some reason the Read (ref. http://is.gd/4Ngjt) method of SlimDX.DirectSound.CaptureBuffer
isn't accepting the array reference properly.&lt;br&gt;
&lt;br&gt;
Maybe I should try the Microsoft.DirextX.DirectSound lib, but it's been a
little bit difficult to find good references about IronPython+DirectSound
(probably by own&amp;nbsp; fault).&lt;br&gt;
&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div class=MsoNormal align=center style='text-align:center'&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;

&lt;hr size=2 width=&quot;100%&quot; align=center id=stopSpelling&gt;

&lt;/span&gt;&lt;/div&gt;

&lt;p class=MsoNormal style='margin-bottom:12.0pt'&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26204525&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dinov@...&lt;/a&gt;&lt;br&gt;
To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26204525&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users@...&lt;/a&gt;&lt;br&gt;
Date: Wed, 4 Nov 2009 20:20:35 +0000&lt;br&gt;
Subject: Re: [IronPython] Reproducing an C# array of floats&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;float in Python is actually double in C#.&amp;nbsp; You probably
want:&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;from System import Single&lt;/span&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;System.Array.CreateInstance(Single, &amp;#8230;)&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;And so on.&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div style='border:none;border-left:solid windowtext 1.5pt;padding:0in 0in 0in 4.0pt;
border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color blue'&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0in 0in 0in;
border-color:-moz-use-text-color -moz-use-text-color'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26204525&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26204525&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;] &lt;b&gt;On
Behalf Of &lt;/b&gt;Daniel D.&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Wednesday, November 04, 2009 12:12 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26204525&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; [IronPython] Reproducing an C# array of floats&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='margin-bottom:12.0pt'&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;Hi all,&lt;br&gt;
&lt;br&gt;
Sorry for the silly question. I'm quite new to ironpython and I've been trying
to solve this issue for the last 3 hours.&lt;br&gt;
&lt;br&gt;
I'm not able to reproduce this code in IronPython. &lt;br&gt;
&lt;br&gt;
float[] sample = new float[8192/sizeof(float)]&lt;br&gt;
&lt;br&gt;
I've tried the following but nothing seems to work in my specific case:&lt;br&gt;
&lt;br&gt;
System.Array.CreateInstance(float, (8192/4))&lt;br&gt;
clr.Reference[System.Array[float]](8192/4)&lt;br&gt;
System.Array[float]([(8192/4)])&lt;br&gt;
&lt;br&gt;
I'm trying to use the SlimDX to capture the microphone input, and pass it to
NumPy to do same FFT stuff.&lt;br&gt;
&lt;br&gt;
The original C# code is here:
http://crsouza.blogspot.com/2009/08/capturing-sound-from-microphone-using.html&lt;br&gt;
&lt;br&gt;
And here my modified version&lt;br&gt;
&lt;br&gt;
import clr&lt;br&gt;
&lt;br&gt;
clr.AddReference('SlimDX')&lt;br&gt;
from SlimDX import *&lt;br&gt;
from System import *&lt;br&gt;
&lt;br&gt;
captureDevice = DirectSound.DirectSoundCapture()&lt;br&gt;
waveFormat = Multimedia.WaveFormat()&lt;br&gt;
&lt;br&gt;
waveFormat.FormatTag = Multimedia.WaveFormatTag.IeeeFloat # For Int16, change
to Pcm&lt;br&gt;
waveFormat.BitsPerSample = 32 # Floats are 32 bits&lt;br&gt;
waveFormat.BlockAlignment = (waveFormat.BitsPerSample/8)&lt;br&gt;
waveFormat.Channels = 1&lt;br&gt;
&lt;br&gt;
waveFormat.SamplesPerSecond = 44100&lt;br&gt;
waveFormat.AverageBytesPerSecond =
waveFormat.SamplesPerSecond*waveFormat.BlockAlignment*waveFormat.Channels&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
bufferDescription = DirectSound.CaptureBufferDescription()&lt;br&gt;
bufferDescription.BufferBytes = 8192&lt;br&gt;
bufferDescription.Format = waveFormat&lt;br&gt;
bufferDescription.WaveMapped = False&lt;br&gt;
&lt;br&gt;
buffer = DirectSound.CaptureBuffer(captureDevice,bufferDescription)&lt;br&gt;
buffer.Start(True)&lt;br&gt;
&lt;br&gt;
#float[] sample = new float[8192/sizeof(float)];&lt;br&gt;
#sample = Array.CreateInstance(float, (8192/4))&lt;br&gt;
#sample = clr.Reference[Array[float]](8192/4)&lt;br&gt;
sample = Array[float]([(8192/4)])&lt;br&gt;
&lt;br&gt;
while (True):&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; #print sample&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; print buffer.Read(sample, 0, True);&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;
&lt;br&gt;
.... which is generating the following error&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
C:\Documents and Settings\Administrator\My Documents&amp;gt;ipy
sound_capture_test.py&lt;br&gt;
Traceback (most recent call last):&lt;br&gt;
&amp;nbsp; File &amp;quot;sound_capture_test.py&amp;quot;, line 34, in
sound_capture_test.py&lt;br&gt;
TypeError: Read() takes at least 2147483647 arguments (3 given)&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;
&lt;br&gt;
Any help will be very appreciated. &lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
Daniel&lt;br&gt;
&lt;br&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div class=MsoNormal align=center style='text-align:center'&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;

&lt;hr size=2 width=&quot;100%&quot; align=center&gt;

&lt;/span&gt;&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;Windows
Live: &lt;a href=&quot;http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Friends
get your Flickr, Yelp, and Digg updates when they e-mail you.&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div class=MsoNormal align=center style='text-align:center'&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;

&lt;hr size=2 width=&quot;100%&quot; align=center&gt;

&lt;/span&gt;&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;Windows
Live Hotmail: &lt;a href=&quot;http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_4:092009&quot; target=&quot;_new&quot; rel=&quot;nofollow&quot;&gt;Your friends can get your Facebook updates, right from Hotmail&amp;reg;.&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26204525&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reproducing-an-C--array-of-floats-tp26203853p26204525.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26204377</id>
	<title>Re: Reproducing an C# array of floats</title>
	<published>2009-11-04T12:48:21Z</published>
	<updated>2009-11-04T12:48:21Z</updated>
	<author>
		<name>Daniel D.-3</name>
	</author>
	<content type="html">&lt;html&gt;
&lt;head&gt;

&lt;/head&gt;
&lt;body class='hmmessage'&gt;
Hi Dino, thanks for the quick reply.&lt;br&gt;&lt;br&gt;Now I'm using System.Single instead float but the error persists.&lt;br&gt;&lt;br&gt;For some reason the Read (ref. http://is.gd/4Ngjt) method of &lt;span style=&quot;font-size: 10pt; font-family: 'Verdana','sans-serif';&quot;&gt;SlimDX.DirectSound.CaptureBuffer&lt;/span&gt; isn't accepting the array reference properly.&lt;br&gt;&lt;br&gt;Maybe I should try the &lt;span style=&quot;font-size: 10pt; font-family: 'Verdana','sans-serif';&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Verdana','sans-serif';&quot;&gt;Microsoft.DirextX.DirectSound lib, but it's been a little bit difficult to find good references about IronPython+DirectSound (probably by own&amp;nbsp; fault).&lt;/span&gt;&lt;br&gt;&amp;nbsp;&lt;br&gt;&lt;br&gt;&lt;hr id=&quot;stopSpelling&quot;&gt;From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26204377&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dinov@...&lt;/a&gt;&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26204377&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users@...&lt;/a&gt;&lt;br&gt;Date: Wed, 4 Nov 2009 20:20:35 +0000&lt;br&gt;Subject: Re: [IronPython] Reproducing an C# array of floats&lt;br&gt;&lt;br&gt;















&lt;div class=&quot;ecxSection1&quot;&gt;

&lt;p class=&quot;ecxMsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);&quot;&gt;float in Python is actually double in C#.&amp;nbsp; You probably want:&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;ecxMsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;ecxMsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);&quot;&gt;from System import Single&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;ecxMsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;ecxMsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);&quot;&gt;System.Array.CreateInstance(Single, …)&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;ecxMsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;ecxMsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);&quot;&gt;And so on.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;ecxMsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;ecxMsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;div style=&quot;border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; border-width: medium medium medium 1.5pt; padding: 0in 0in 0in 4pt;&quot;&gt;

&lt;div&gt;

&lt;div style=&quot;border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;&quot;&gt;

&lt;p class=&quot;ecxMsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Tahoma','sans-serif';&quot;&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Tahoma','sans-serif';&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26204377&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26204377&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;] &lt;b&gt;On Behalf Of &lt;/b&gt;Daniel D.&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Wednesday, November 04, 2009 12:12 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26204377&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; [IronPython] Reproducing an C# array of floats&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=&quot;ecxMsoNormal&quot;&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class=&quot;ecxMsoNormal&quot; style=&quot;margin-bottom: 12pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Verdana','sans-serif';&quot;&gt;Hi all,&lt;br&gt;
&lt;br&gt;
Sorry for the silly question. I'm quite new to ironpython and I've been trying
to solve this issue for the last 3 hours.&lt;br&gt;
&lt;br&gt;
I'm not able to reproduce this code in IronPython. &lt;br&gt;
&lt;br&gt;
float[] sample = new float[8192/sizeof(float)]&lt;br&gt;
&lt;br&gt;
I've tried the following but nothing seems to work in my specific case:&lt;br&gt;
&lt;br&gt;
System.Array.CreateInstance(float, (8192/4))&lt;br&gt;
clr.Reference[System.Array[float]](8192/4)&lt;br&gt;
System.Array[float]([(8192/4)])&lt;br&gt;
&lt;br&gt;
I'm trying to use the SlimDX to capture the microphone input, and pass it to
NumPy to do same FFT stuff.&lt;br&gt;
&lt;br&gt;
The original C# code is here:
http://crsouza.blogspot.com/2009/08/capturing-sound-from-microphone-using.html&lt;br&gt;
&lt;br&gt;
And here my modified version&lt;br&gt;
&lt;br&gt;
import clr&lt;br&gt;
&lt;br&gt;
clr.AddReference('SlimDX')&lt;br&gt;
from SlimDX import *&lt;br&gt;
from System import *&lt;br&gt;
&lt;br&gt;
captureDevice = DirectSound.DirectSoundCapture()&lt;br&gt;
waveFormat = Multimedia.WaveFormat()&lt;br&gt;
&lt;br&gt;
waveFormat.FormatTag = Multimedia.WaveFormatTag.IeeeFloat # For Int16, change
to Pcm&lt;br&gt;
waveFormat.BitsPerSample = 32 # Floats are 32 bits&lt;br&gt;
waveFormat.BlockAlignment = (waveFormat.BitsPerSample/8)&lt;br&gt;
waveFormat.Channels = 1&lt;br&gt;
&lt;br&gt;
waveFormat.SamplesPerSecond = 44100&lt;br&gt;
waveFormat.AverageBytesPerSecond =
waveFormat.SamplesPerSecond*waveFormat.BlockAlignment*waveFormat.Channels&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
bufferDescription = DirectSound.CaptureBufferDescription()&lt;br&gt;
bufferDescription.BufferBytes = 8192&lt;br&gt;
bufferDescription.Format = waveFormat&lt;br&gt;
bufferDescription.WaveMapped = False&lt;br&gt;
&lt;br&gt;
buffer = DirectSound.CaptureBuffer(captureDevice,bufferDescription)&lt;br&gt;
buffer.Start(True)&lt;br&gt;
&lt;br&gt;
#float[] sample = new float[8192/sizeof(float)];&lt;br&gt;
#sample = Array.CreateInstance(float, (8192/4))&lt;br&gt;
#sample = clr.Reference[Array[float]](8192/4)&lt;br&gt;
sample = Array[float]([(8192/4)])&lt;br&gt;
&lt;br&gt;
while (True):&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; #print sample&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; print buffer.Read(sample, 0, True);&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;
&lt;br&gt;
.... which is generating the following error&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
C:\Documents and Settings\Administrator\My Documents&amp;gt;ipy
sound_capture_test.py&lt;br&gt;
Traceback (most recent call last):&lt;br&gt;
&amp;nbsp; File &quot;sound_capture_test.py&quot;, line 34, in sound_capture_test.py&lt;br&gt;
TypeError: Read() takes at least 2147483647 arguments (3 given)&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;
&lt;br&gt;
Any help will be very appreciated. &lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
Daniel&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/span&gt;&lt;/p&gt;

&lt;div class=&quot;ecxMsoNormal&quot; style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Verdana','sans-serif';&quot;&gt;

&lt;hr width=&quot;100%&quot; align=&quot;center&quot; size=&quot;2&quot;&gt;

&lt;/span&gt;&lt;/div&gt;

&lt;p class=&quot;ecxMsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Verdana','sans-serif';&quot;&gt;Windows
Live: &lt;a href=&quot;http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Friends get your Flickr, Yelp, and Digg updates when they e-mail
you.&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt; 		 	   		  &lt;br /&gt;&lt;hr /&gt;Windows Live Hotmail:  &lt;a href='http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_4:092009' target='_new' rel=&quot;nofollow&quot;&gt;Your friends can get your Facebook updates, right from Hotmail®.&lt;/a&gt;&lt;/body&gt;
&lt;/html&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26204377&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reproducing-an-C--array-of-floats-tp26203853p26204377.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26203956</id>
	<title>Re: Reproducing an C# array of floats</title>
	<published>2009-11-04T12:20:35Z</published>
	<updated>2009-11-04T12:20:35Z</updated>
	<author>
		<name>Dino Viehland</name>
	</author>
	<content type="html">&lt;html xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:x=&quot;urn:schemas-microsoft-com:office:excel&quot; xmlns:p=&quot;urn:schemas-microsoft-com:office:powerpoint&quot; xmlns:a=&quot;urn:schemas-microsoft-com:office:access&quot; xmlns:dt=&quot;uuid:C2F41010-65B3-11d1-A29F-00AA00C14882&quot; xmlns:s=&quot;uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882&quot; xmlns:rs=&quot;urn:schemas-microsoft-com:rowset&quot; xmlns:Z=&quot;urn:schemas-microsoft-com:&quot; xmlns:b=&quot;urn:schemas-microsoft-com:office:publisher&quot; xmlns:ss=&quot;urn:schemas-microsoft-com:office:spreadsheet&quot; xmlns:c=&quot;urn:schemas-microsoft-com:office:component:spreadsheet&quot; xmlns:odc=&quot;urn:schemas-microsoft-com:office:odc&quot; xmlns:oa=&quot;urn:schemas-microsoft-com:office:activation&quot; xmlns:html=&quot;http://www.w3.org/TR/REC-html40&quot; xmlns:q=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:rtc=&quot;http://microsoft.com/officenet/conferencing&quot; xmlns:D=&quot;DAV:&quot; xmlns:Repl=&quot;http://schemas.microsoft.com/repl/&quot; xmlns:mt=&quot;http://schemas.microsoft.com/sharepoint/soap/meetings/&quot; xmlns:x2=&quot;http://schemas.microsoft.com/office/excel/2003/xml&quot; xmlns:ppda=&quot;http://www.passport.com/NameSpace.xsd&quot; xmlns:ois=&quot;http://schemas.microsoft.com/sharepoint/soap/ois/&quot; xmlns:dir=&quot;http://schemas.microsoft.com/sharepoint/soap/directory/&quot; xmlns:ds=&quot;http://www.w3.org/2000/09/xmldsig#&quot; xmlns:dsp=&quot;http://schemas.microsoft.com/sharepoint/dsp&quot; xmlns:udc=&quot;http://schemas.microsoft.com/data/udc&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:sub=&quot;http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/&quot; xmlns:ec=&quot;http://www.w3.org/2001/04/xmlenc#&quot; xmlns:sp=&quot;http://schemas.microsoft.com/sharepoint/&quot; xmlns:sps=&quot;http://schemas.microsoft.com/sharepoint/soap/&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:udcs=&quot;http://schemas.microsoft.com/data/udc/soap&quot; xmlns:udcxf=&quot;http://schemas.microsoft.com/data/udc/xmlfile&quot; xmlns:udcp2p=&quot;http://schemas.microsoft.com/data/udc/parttopart&quot; xmlns:wf=&quot;http://schemas.microsoft.com/sharepoint/soap/workflow/&quot; xmlns:dsss=&quot;http://schemas.microsoft.com/office/2006/digsig-setup&quot; xmlns:dssi=&quot;http://schemas.microsoft.com/office/2006/digsig&quot; xmlns:mdssi=&quot;http://schemas.openxmlformats.org/package/2006/digital-signature&quot; xmlns:mver=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot; xmlns:m=&quot;http://schemas.microsoft.com/office/2004/12/omml&quot; xmlns:mrels=&quot;http://schemas.openxmlformats.org/package/2006/relationships&quot; xmlns:spwp=&quot;http://microsoft.com/sharepoint/webpartpages&quot; xmlns:ex12t=&quot;http://schemas.microsoft.com/exchange/services/2006/types&quot; xmlns:ex12m=&quot;http://schemas.microsoft.com/exchange/services/2006/messages&quot; xmlns:pptsl=&quot;http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/&quot; xmlns:spsl=&quot;http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService&quot; xmlns:st=&quot;&amp;#1;&quot; xmlns=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;

&lt;head&gt;
&lt;META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html; charset=us-ascii&quot;&gt;
&lt;meta name=Generator content=&quot;Microsoft Word 12 (filtered medium)&quot;&gt;
&lt;!--[if !mso]&gt;
&lt;style&gt;
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext=&quot;edit&quot; spidmax=&quot;1026&quot; /&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext=&quot;edit&quot;&gt;
  &lt;o:idmap v:ext=&quot;edit&quot; data=&quot;1&quot; /&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;
&lt;/head&gt;

&lt;body lang=EN-US link=blue vlink=purple&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;float in Python is actually double in C#.&amp;nbsp; You probably want:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;from System import Single&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;System.Array.CreateInstance(Single, &amp;#8230;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;And so on.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26203956&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26203956&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;] &lt;b&gt;On Behalf Of &lt;/b&gt;Daniel D.&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Wednesday, November 04, 2009 12:12 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26203956&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; [IronPython] Reproducing an C# array of floats&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='margin-bottom:12.0pt'&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;Hi all,&lt;br&gt;
&lt;br&gt;
Sorry for the silly question. I'm quite new to ironpython and I've been trying
to solve this issue for the last 3 hours.&lt;br&gt;
&lt;br&gt;
I'm not able to reproduce this code in IronPython. &lt;br&gt;
&lt;br&gt;
float[] sample = new float[8192/sizeof(float)]&lt;br&gt;
&lt;br&gt;
I've tried the following but nothing seems to work in my specific case:&lt;br&gt;
&lt;br&gt;
System.Array.CreateInstance(float, (8192/4))&lt;br&gt;
clr.Reference[System.Array[float]](8192/4)&lt;br&gt;
System.Array[float]([(8192/4)])&lt;br&gt;
&lt;br&gt;
I'm trying to use the SlimDX to capture the microphone input, and pass it to
NumPy to do same FFT stuff.&lt;br&gt;
&lt;br&gt;
The original C# code is here:
http://crsouza.blogspot.com/2009/08/capturing-sound-from-microphone-using.html&lt;br&gt;
&lt;br&gt;
And here my modified version&lt;br&gt;
&lt;br&gt;
import clr&lt;br&gt;
&lt;br&gt;
clr.AddReference('SlimDX')&lt;br&gt;
from SlimDX import *&lt;br&gt;
from System import *&lt;br&gt;
&lt;br&gt;
captureDevice = DirectSound.DirectSoundCapture()&lt;br&gt;
waveFormat = Multimedia.WaveFormat()&lt;br&gt;
&lt;br&gt;
waveFormat.FormatTag = Multimedia.WaveFormatTag.IeeeFloat # For Int16, change
to Pcm&lt;br&gt;
waveFormat.BitsPerSample = 32 # Floats are 32 bits&lt;br&gt;
waveFormat.BlockAlignment = (waveFormat.BitsPerSample/8)&lt;br&gt;
waveFormat.Channels = 1&lt;br&gt;
&lt;br&gt;
waveFormat.SamplesPerSecond = 44100&lt;br&gt;
waveFormat.AverageBytesPerSecond =
waveFormat.SamplesPerSecond*waveFormat.BlockAlignment*waveFormat.Channels&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
bufferDescription = DirectSound.CaptureBufferDescription()&lt;br&gt;
bufferDescription.BufferBytes = 8192&lt;br&gt;
bufferDescription.Format = waveFormat&lt;br&gt;
bufferDescription.WaveMapped = False&lt;br&gt;
&lt;br&gt;
buffer = DirectSound.CaptureBuffer(captureDevice,bufferDescription)&lt;br&gt;
buffer.Start(True)&lt;br&gt;
&lt;br&gt;
#float[] sample = new float[8192/sizeof(float)];&lt;br&gt;
#sample = Array.CreateInstance(float, (8192/4))&lt;br&gt;
#sample = clr.Reference[Array[float]](8192/4)&lt;br&gt;
sample = Array[float]([(8192/4)])&lt;br&gt;
&lt;br&gt;
while (True):&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; #print sample&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; print buffer.Read(sample, 0, True);&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;
&lt;br&gt;
.... which is generating the following error&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
C:\Documents and Settings\Administrator\My Documents&amp;gt;ipy
sound_capture_test.py&lt;br&gt;
Traceback (most recent call last):&lt;br&gt;
&amp;nbsp; File &amp;quot;sound_capture_test.py&amp;quot;, line 34, in sound_capture_test.py&lt;br&gt;
TypeError: Read() takes at least 2147483647 arguments (3 given)&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;
&lt;br&gt;
Any help will be very appreciated. &lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
Daniel&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div class=MsoNormal align=center style='text-align:center'&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;

&lt;hr size=2 width=&quot;100%&quot; align=center&gt;

&lt;/span&gt;&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;'&gt;Windows
Live: &lt;a href=&quot;http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010&quot; target=&quot;_new&quot; rel=&quot;nofollow&quot;&gt;Friends get your Flickr, Yelp, and Digg updates when they e-mail
you.&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26203956&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reproducing-an-C--array-of-floats-tp26203853p26203956.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26203853</id>
	<title>Reproducing an C# array of floats</title>
	<published>2009-11-04T12:12:26Z</published>
	<updated>2009-11-04T12:12:26Z</updated>
	<author>
		<name>Daniel D.-3</name>
	</author>
	<content type="html">&lt;html&gt;
&lt;head&gt;

&lt;/head&gt;
&lt;body class='hmmessage'&gt;
Hi all,&lt;br&gt;&lt;br&gt;Sorry for the silly question. I'm quite new to ironpython and I've been trying to solve this issue for the last 3 hours.&lt;br&gt;&lt;br&gt;I'm not able to reproduce this code in IronPython. &lt;br&gt;&lt;br&gt;float[] sample = new float[8192/sizeof(float)]&lt;br&gt;&lt;br&gt;I've tried the following but nothing seems to work in my specific case:&lt;br&gt;&lt;br&gt;System.Array.CreateInstance(float, (8192/4))&lt;br&gt;clr.Reference[System.Array[float]](8192/4)&lt;br&gt;System.Array[float]([(8192/4)])&lt;br&gt;&lt;br&gt;I'm trying to use the SlimDX to capture the microphone input, and pass it to NumPy to do same FFT stuff.&lt;br&gt;&lt;br&gt;The original C# code is here: http://crsouza.blogspot.com/2009/08/capturing-sound-from-microphone-using.html&lt;br&gt;&lt;br&gt;And here my modified version&lt;br&gt;&lt;br&gt;import clr&lt;br&gt;&lt;br&gt;clr.AddReference('SlimDX')&lt;br&gt;from SlimDX import *&lt;br&gt;from System import *&lt;br&gt;&lt;br&gt;captureDevice = DirectSound.DirectSoundCapture()&lt;br&gt;waveFormat = Multimedia.WaveFormat()&lt;br&gt;&lt;br&gt;waveFormat.FormatTag = Multimedia.WaveFormatTag.IeeeFloat # For Int16, change to Pcm&lt;br&gt;waveFormat.BitsPerSample = 32 # Floats are 32 bits&lt;br&gt;waveFormat.BlockAlignment = (waveFormat.BitsPerSample/8)&lt;br&gt;waveFormat.Channels = 1&lt;br&gt;&lt;br&gt;waveFormat.SamplesPerSecond = 44100&lt;br&gt;waveFormat.AverageBytesPerSecond = waveFormat.SamplesPerSecond*waveFormat.BlockAlignment*waveFormat.Channels&lt;br&gt;&lt;br&gt;&lt;br&gt;bufferDescription = DirectSound.CaptureBufferDescription()&lt;br&gt;bufferDescription.BufferBytes = 8192&lt;br&gt;bufferDescription.Format = waveFormat&lt;br&gt;bufferDescription.WaveMapped = False&lt;br&gt;&lt;br&gt;buffer = DirectSound.CaptureBuffer(captureDevice,bufferDescription)&lt;br&gt;buffer.Start(True)&lt;br&gt;&lt;br&gt;#float[] sample = new float[8192/sizeof(float)];&lt;br&gt;#sample = Array.CreateInstance(float, (8192/4))&lt;br&gt;#sample = clr.Reference[Array[float]](8192/4)&lt;br&gt;sample = Array[float]([(8192/4)])&lt;br&gt;&lt;br&gt;while (True):&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #print sample&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print buffer.Read(sample, 0, True);&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&lt;br&gt;.... which is generating the following error&lt;br&gt;&lt;br&gt;&lt;br&gt;C:\Documents and Settings\Administrator\My Documents&amp;gt;ipy sound_capture_test.py&lt;br&gt;
Traceback (most recent call last):&lt;br&gt;
&amp;nbsp; File &quot;sound_capture_test.py&quot;, line 34, in sound_capture_test.py&lt;br&gt;
TypeError: Read() takes at least 2147483647 arguments (3 given)&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&lt;br&gt;Any help will be very appreciated. &lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;Daniel&lt;br&gt;&lt;br&gt;&lt;br&gt; 		 	   		  &lt;br /&gt;&lt;hr /&gt;Windows Live:  &lt;a href='http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010' target='_new' rel=&quot;nofollow&quot;&gt;Friends get your Flickr, Yelp, and Digg updates when they e-mail you.&lt;/a&gt;&lt;/body&gt;
&lt;/html&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26203853&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reproducing-an-C--array-of-floats-tp26203853p26203853.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26203764</id>
	<title>IronPython 2.6 CodePlex Source Update</title>
	<published>2009-11-04T12:08:19Z</published>
	<updated>2009-11-04T12:08:19Z</updated>
	<author>
		<name>merllab</name>
	</author>
	<content type="html">This is an automated email letting you know that sources 
&lt;br&gt;have recently been pushed out. &amp;nbsp;You can download these newer 
&lt;br&gt;sources directly from &lt;a href=&quot;http://ironpython.codeplex.com/SourceControl/changeset/view/61024&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ironpython.codeplex.com/SourceControl/changeset/view/61024&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;DELETED SOURCES
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_2_6/Src/Tests/compat/sbs_library.dll
&lt;br&gt;&lt;br&gt;MODIFIED SOURCES
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $/IronPython/IronPython_2_6/Src/Tests/compat/sbs_func_args.py
&lt;br&gt;&lt;br&gt;CHECKIN COMMENTS
&lt;br&gt;--------------------------------------------------------------------------------
&lt;br&gt;Changeset Id: 1250429
&lt;br&gt;Date: 11/3/2009 12:39:57 PM
&lt;br&gt;&lt;br&gt;(dfugate) Migrated sbs_library.dll change from the Main branch over to IP_26.
&lt;br&gt;&lt;br&gt;&lt;br&gt;(Shelveset: SBS_LIBRARY_IP26;REDMOND\dfugate | SNAP CheckinId: 9735)
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26203764&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/IronPython-2.6-CodePlex-Source-Update-tp26203764p26203764.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26202163</id>
	<title>Re: Safe execution of python scripts on my	.net	application</title>
	<published>2009-11-04T10:36:15Z</published>
	<updated>2009-11-04T10:36:15Z</updated>
	<author>
		<name>Shri Borde</name>
	</author>
	<content type="html">&lt;META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html; charset=iso-8859-1&quot;&gt;
&lt;html xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:x=&quot;urn:schemas-microsoft-com:office:excel&quot; xmlns:p=&quot;urn:schemas-microsoft-com:office:powerpoint&quot; xmlns:a=&quot;urn:schemas-microsoft-com:office:access&quot; xmlns:dt=&quot;uuid:C2F41010-65B3-11d1-A29F-00AA00C14882&quot; xmlns:s=&quot;uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882&quot; xmlns:rs=&quot;urn:schemas-microsoft-com:rowset&quot; xmlns:Z=&quot;urn:schemas-microsoft-com:&quot; xmlns:b=&quot;urn:schemas-microsoft-com:office:publisher&quot; xmlns:ss=&quot;urn:schemas-microsoft-com:office:spreadsheet&quot; xmlns:c=&quot;urn:schemas-microsoft-com:office:component:spreadsheet&quot; xmlns:odc=&quot;urn:schemas-microsoft-com:office:odc&quot; xmlns:oa=&quot;urn:schemas-microsoft-com:office:activation&quot; xmlns:html=&quot;http://www.w3.org/TR/REC-html40&quot; xmlns:q=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:rtc=&quot;http://microsoft.com/officenet/conferencing&quot; xmlns:D=&quot;DAV:&quot; xmlns:Repl=&quot;http://schemas.microsoft.com/repl/&quot; xmlns:mt=&quot;http://schemas.microsoft.com/sharepoint/soap/meetings/&quot; xmlns:x2=&quot;http://schemas.microsoft.com/office/excel/2003/xml&quot; xmlns:ppda=&quot;http://www.passport.com/NameSpace.xsd&quot; xmlns:ois=&quot;http://schemas.microsoft.com/sharepoint/soap/ois/&quot; xmlns:dir=&quot;http://schemas.microsoft.com/sharepoint/soap/directory/&quot; xmlns:ds=&quot;http://www.w3.org/2000/09/xmldsig#&quot; xmlns:dsp=&quot;http://schemas.microsoft.com/sharepoint/dsp&quot; xmlns:udc=&quot;http://schemas.microsoft.com/data/udc&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:sub=&quot;http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/&quot; xmlns:ec=&quot;http://www.w3.org/2001/04/xmlenc#&quot; xmlns:sp=&quot;http://schemas.microsoft.com/sharepoint/&quot; xmlns:sps=&quot;http://schemas.microsoft.com/sharepoint/soap/&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:udcs=&quot;http://schemas.microsoft.com/data/udc/soap&quot; xmlns:udcxf=&quot;http://schemas.microsoft.com/data/udc/xmlfile&quot; xmlns:udcp2p=&quot;http://schemas.microsoft.com/data/udc/parttopart&quot; xmlns:wf=&quot;http://schemas.microsoft.com/sharepoint/soap/workflow/&quot; xmlns:dsss=&quot;http://schemas.microsoft.com/office/2006/digsig-setup&quot; xmlns:dssi=&quot;http://schemas.microsoft.com/office/2006/digsig&quot; xmlns:mdssi=&quot;http://schemas.openxmlformats.org/package/2006/digital-signature&quot; xmlns:mver=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot; xmlns:m=&quot;http://schemas.microsoft.com/office/2004/12/omml&quot; xmlns:mrels=&quot;http://schemas.openxmlformats.org/package/2006/relationships&quot; xmlns:spwp=&quot;http://microsoft.com/sharepoint/webpartpages&quot; xmlns:ex12t=&quot;http://schemas.microsoft.com/exchange/services/2006/types&quot; xmlns:ex12m=&quot;http://schemas.microsoft.com/exchange/services/2006/messages&quot; xmlns:pptsl=&quot;http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/&quot; xmlns:spsl=&quot;http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService&quot; xmlns:st=&quot;&amp;#1;&quot; xmlns=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;

&lt;head&gt;

&lt;meta name=Generator content=&quot;Microsoft Word 12 (filtered medium)&quot;&gt;

&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext=&quot;edit&quot; spidmax=&quot;1026&quot; /&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext=&quot;edit&quot;&gt;
  &lt;o:idmap v:ext=&quot;edit&quot; data=&quot;1&quot; /&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;
&lt;/head&gt;

&lt;body lang=EN-US link=blue vlink=purple&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;a href=&quot;http://www.dev102.com/2008/03/22/3-ways-to-run-nunit-from-visual-studio/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.dev102.com/2008/03/22/3-ways-to-run-nunit-from-visual-studio/&lt;/a&gt;
has some info about test projects and appbase problems.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;You can also use fuslogvw (&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/e74a18c4(VS.71).aspx)&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://msdn.microsoft.com/en-us/library/e74a18c4(VS.71).aspx)&lt;/a&gt;
to see why Microsoft.Scripting.dll is failing to load.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26202163&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26202163&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;] &lt;b&gt;On
Behalf Of &lt;/b&gt;Dino Viehland&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Tuesday, November 03, 2009 1:52 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;Test projects are weird and somehow you don&amp;#8217;t end up inheriting
the application base.&amp;nbsp; This seems to work though:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AppDomainSetup
setup = new AppDomainSetup();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
setup.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
AppDomain aSandboxedDomain = AppDomain.CreateDomain(&amp;quot;Sandboxed
Domain&amp;quot;, null, setup);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
ScriptEngine engine = Python.CreateEngine(aSandboxedDomain);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
ScriptSource source = engine.CreateScriptSourceFromString(&amp;quot;2+2&amp;quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
ScriptScope scope = engine.CreateScope();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Console.WriteLine(source.Execute(scope));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26202163&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26202163&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;] &lt;b&gt;On
Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Tuesday, November 03, 2009 1:30 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;I have create a new &amp;quot;Test Project&amp;quot; and an Unit
Test class in order to test the following code inside:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;AppDomain aSandboxedDomain = AppDomain.CreateDomain(&amp;quot;Sandboxed
Domain&amp;quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;ScriptEngine engine = Python.CreateEngine(aSandboxedDomain);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;ScriptSource source =
engine.CreateScriptSourceFromString(pythonScript);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;ScriptScope scope = engine.CreateScope();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;source.Execute(scope);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;I have add the references:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;- IronPython&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;- Microsoft.Scripting&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;- Microsoft.ScriptingCore&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;But it still not working and&amp;nbsp;throwing&amp;nbsp;the
same&amp;nbsp;System.Runtime.Serialization.SerializationException: Type is not
resolved for member
'Microsoft.Scripting.Hosting.ScriptRuntimeSetup,Microsoft.Scripting.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;Any ideas?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;2009/11/3 Nicolás Buttarelli &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26202163&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;nbuttarelli@...&lt;/a&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;Thanks Shri, I will try.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;In addition, I found this open issue:&amp;nbsp;&lt;a href=&quot;http://dlr.codeplex.com/WorkItem/View.aspx?WorkItemId=2816&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://dlr.codeplex.com/WorkItem/View.aspx?WorkItemId=2816&lt;/a&gt;.
I think that it is related.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='margin-bottom:12.0pt'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;On Tue, Nov 3, 2009 at 9:29 PM, Shri Borde &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26202163&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Shri.Borde@...&lt;/a&gt;&amp;gt;
wrote:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;I think this happens if the new
appdomain cannot load the required assembly. By default, the new appdomain
should inherit its BaseDirectory property from the creating domain and should
be able to load Microsoft.Scripting.dll. Is your exe and all the dlls in the
same folder? If not, can you try to put all assemblies in the same folder (or
in the GAC) to see if it works? If that works, you can then figure out how to
configure the new appdomain such that it can load Microsoft.Scripting.dll.
There may be some setting in AppDomainSetup, or you could hook the
AssemblyResolve event&amp;#8230;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26202163&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26202163&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Tuesday, November 03, 2009 12:08 PM&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Hi
again, thanks for your clear response.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;I
was trying to do what you&amp;nbsp;proposed&amp;nbsp;but it is not working. I am
receiving an exception:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'&gt;&lt;i&gt;Test
method CadworX3WCFRestTest.IronPython.SafeScriptExecutionTest.writingAFileTest
threw exception: &amp;nbsp;System.Runtime.Serialization.SerializationException:
Type is not resolved for member
'Microsoft.Scripting.Hosting.ScriptRuntimeSetup,Microsoft.Scripting,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'..&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;I
tried to find a solution but I couldn't. This is the minimal code that I am
running to get this exception (I have removed all the security stuff but
apparently that does not resolve the problem):&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;i&gt;AppDomain
aSandboxedDomain = AppDomain.CreateDomain(&amp;quot;Sandboxed Domain&amp;quot;);&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;i&gt;ScriptEngine
engine = Python.CreateEngine(aSandboxedDomain);&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;i&gt;ScriptSource
source = engine.CreateScriptSourceFromString(pythonScript);&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;i&gt;SriptScope
scope = engine.CreateScope();&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;i&gt;source.Execute(scope);&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;The
exception is&amp;nbsp;thronged in this line:&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;i&gt;ScriptEngine
engine = Python.CreateEngine(aSandboxedDomain);&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Do
you have any idea which could be the problem?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Thanks
again,&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Nicolas&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;On
Mon, Nov 2, 2009 at 10:25 PM, Dino Viehland &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26202163&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dinov@...&lt;/a&gt;&amp;gt;
wrote:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;Assuming the app domain is setup
properly then there&amp;#8217;s no way for the Python code to elevate permissions (modulo
CLR security bugs which are few and far between).&amp;nbsp; This is because
IronPython its self is 100% security transparent and does not affect any security
decisions or assert any form of trust &amp;#8211; so it&amp;#8217;s all up to the CLR to limit
permissions.&amp;nbsp; So for example while you can access the file object, or
import ctypes, or call various other Python APIs which would require trust
you&amp;#8217;ll get a security exception from the CLR when you don&amp;#8217;t have permissions to
do something.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;For more complex scenarios you might
also have an object model which you expose to the application and inject in via
its scope.&amp;nbsp; Once you&amp;#8217;ve done that you&amp;#8217;ll want to make sure that the object
model is also secure.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26202163&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26202163&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Monday, November 02, 2009 1:20 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [IronPython] Safe execution of python scripts on my .net
application&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Thanks
for your response.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;But
what happens with the python code? Does not exist a&amp;nbsp;way to write some
scripts that can do some damage to my app, the server, the database, etc?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Thanks
again,&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;Nicolas&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;On
Mon, Nov 2, 2009 at 9:41 PM, Dino Viehland &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26202163&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dinov@...&lt;/a&gt;&amp;gt;
wrote:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;After creating your app domain you can
do:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;ScriptEngine engine =
Python.CreateEngine(someAppDomain);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;And then the rest of your code should
work as it&amp;#8217;s written.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:11.0pt;color:#1F497D'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26202163&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26202163&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;]
&lt;b&gt;On Behalf Of &lt;/b&gt;Nicolás Buttarelli&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Monday, November 02, 2009 12:39 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26202163&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; [IronPython] Safe execution of python scripts on my .net
application&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;Sorry, I don't know if my previous message have
arrived. So, here it is:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;Hello all,&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;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.&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;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.&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;In .net I can do this using the AppDoman and setting
the permission set.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#333333'&gt;AppDomain.CreateDomain(&amp;nbsp;&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;string&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#333333'&gt;&amp;nbsp;friendlyName,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Evidence
securityInfo,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AppDomainSetup
info,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PermissionSet
grantSet,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue'&gt;params&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#333333'&gt;&amp;nbsp;StrongName[]
fullTrustAssemblies);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;Is there a way to do the same with my python
scripts?&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;I am running them using this:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;ScriptEngine engine = Python.CreateEngine();&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;ScriptSource source =
engine.CreateScriptSourceFromString(scriptAsString);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;ScriptScope scope = engine.CreateScope();&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;source.Execute(scope);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;Thanks in advance.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;span style='font-size:10.0pt'&gt;Nicolas&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26202163&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26202163&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='margin-bottom:12.0pt'&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26202163&amp;i=17&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26202163&amp;i=18&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Safe-execution-of-python-scripts-on-my-.net-application-tp26170322p26202163.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26201115</id>
	<title>Re: Adding imports?</title>
	<published>2009-11-04T09:38:38Z</published>
	<updated>2009-11-04T09:38:38Z</updated>
	<author>
		<name>Dave Purrington-2</name>
	</author>
	<content type="html">You can load assemblies as well. For example, the hosting assembly:&lt;br&gt;&lt;br&gt;            Assembly mainAssembly = Assembly.GetExecutingAssembly();&lt;br&gt;            string rootDir = Directory.GetParent(mainAssembly.Location).FullName;&lt;br&gt;
&lt;br&gt;            _engine.Runtime.LoadAssembly(mainAssembly);&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Wed, Nov 4, 2009 at 12:11 PM, Slide &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26201115&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;slide.o.mix@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;That is perfect! Thanks!&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;On Wed, Nov 4, 2009 at 10:08 AM, Dino Viehland &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26201115&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dinov@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;









&lt;div link=&quot;blue&quot; vlink=&quot;purple&quot; lang=&quot;EN-US&quot;&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;You can do:&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;scope.SetVariable(“name”, engine.ImportModule(“module_name”));&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;Where ImportModule is an extension method defined in
IronPython.Hosting.Python.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;div style=&quot;border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; border-width: medium medium medium 1.5pt; padding: 0in 0in 0in 4pt;&quot;&gt;

&lt;div&gt;

&lt;div style=&quot;border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26201115&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26201115&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;] &lt;b&gt;On
Behalf Of &lt;/b&gt;Slide&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Wednesday, November 04, 2009 9:05 AM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; [IronPython] Adding imports?&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Is it possible to add imports to a script without just
adding text to the source code before compilation?&lt;br&gt;
&lt;br&gt;
Maybe something on the script scope or something?&lt;br&gt;
&lt;br&gt;
Thanks&lt;br clear=&quot;all&quot;&gt;
&lt;br&gt;
-- &lt;br&gt;
slide-o-blog&lt;br&gt;
&lt;a href=&quot;http://slide-o-blog.blogspot.com/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://slide-o-blog.blogspot.com/&lt;/a&gt;&lt;/p&gt;

&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;


&lt;br&gt;&lt;/div&gt;&lt;/div&gt;_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26201115&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;slide-o-blog&lt;br&gt;&lt;a href=&quot;http://slide-o-blog.blogspot.com/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://slide-o-blog.blogspot.com/&lt;/a&gt;&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;br&gt;_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26201115&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26201115&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Adding-imports--tp26200298p26201115.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26200391</id>
	<title>Re: Adding imports?</title>
	<published>2009-11-04T09:11:48Z</published>
	<updated>2009-11-04T09:11:48Z</updated>
	<author>
		<name>Slide-2</name>
	</author>
	<content type="html">That is perfect! Thanks!&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Wed, Nov 4, 2009 at 10:08 AM, Dino Viehland &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26200391&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dinov@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;









&lt;div link=&quot;blue&quot; vlink=&quot;purple&quot; lang=&quot;EN-US&quot;&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;You can do:&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;scope.SetVariable(“name”, engine.ImportModule(“module_name”));&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt;Where ImportModule is an extension method defined in
IronPython.Hosting.Python.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 11pt; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;div style=&quot;border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; border-width: medium medium medium 1.5pt; padding: 0in 0in 0in 4pt;&quot;&gt;

&lt;div&gt;

&lt;div style=&quot;border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26200391&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26200391&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-bounces@...&lt;/a&gt;] &lt;b&gt;On
Behalf Of &lt;/b&gt;Slide&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Wednesday, November 04, 2009 9:05 AM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Discussion of IronPython&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; [IronPython] Adding imports?&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;Is it possible to add imports to a script without just
adding text to the source code before compilation?&lt;br&gt;
&lt;br&gt;
Maybe something on the script scope or something?&lt;br&gt;
&lt;br&gt;
Thanks&lt;br clear=&quot;all&quot;&gt;
&lt;br&gt;
-- &lt;br&gt;
slide-o-blog&lt;br&gt;
&lt;a href=&quot;http://slide-o-blog.blogspot.com/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://slide-o-blog.blogspot.com/&lt;/a&gt;&lt;/p&gt;

&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;


&lt;br&gt;_______________________________________________&lt;br&gt;
Users mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26200391&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;slide-o-blog&lt;br&gt;&lt;a href=&quot;http://slide-o-blog.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://slide-o-blog.blogspot.com/&lt;/a&gt;&lt;br&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26200391&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ironpython.com/listinfo.cgi/users-ironpython.com&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Adding-imports--tp26200298p26200391.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26200346</id>
	<title>Re: Adding imports?</title>
	<published>2009-11-04T09:08:39Z</published>
	<updated>2009-11-04T09:08:39Z</updated>
	<author>
		<name>Dino Viehland</name>
	</author>
	<content type="html">&lt;html xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:x=&quot;urn:schemas-microsoft-com:office:excel&quot; xmlns:p=&quot;urn:schemas-microsoft-com:office:powerpoint&quot; xmlns:a=&quot;urn:schemas-microsoft-com:office:access&quot; xmlns:dt=&quot;uuid:C2F41010-65B3-11d1-A29F-00AA00C14882&quot; xmlns:s=&quot;uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882&quot; xmlns:rs=&quot;urn:schemas-microsoft-com:rowset&quot; xmlns:Z=&quot;urn:schemas-microsoft-com:&quot; xmlns:b=&quot;urn:schemas-microsoft-com:office:publisher&quot; xmlns:ss=&quot;urn:schemas-microsoft-com:office:spreadsheet&quot; xmlns:c=&quot;urn:schemas-microsoft-com:office:component:spreadsheet&quot; xmlns:odc=&quot;urn:schemas-microsoft-com:office:odc&quot; xmlns:oa=&quot;urn:schemas-microsoft-com:office:activation&quot; xmlns:html=&quot;http://www.w3.org/TR/REC-html40&quot; xmlns:q=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:rtc=&quot;http://microsoft.com/officenet/conferencing&quot; xmlns:D=&quot;DAV:&quot; xmlns:Repl=&quot;http://schemas.microsoft.com