Ok, Thank you.<br><br>Does anyone know where could I find an IronPython Assembly documentation and/or up to date tutorials ?<br><br>Thank you again.<br><br><div class="gmail_quote">2009/1/20 Curt Hagenlocher <span dir="ltr"><<a href="mailto:curt@hagenlocher.org" target="_blank">curt@hagenlocher.org</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I believe this was valid for a long-ago alpha. For the 2.0 release, you'll want to create an engine by saying<div>
engine = Python.CreateEngine()<br></div><div><br><div class="gmail_quote"><div><div></div><div>On Tue, Jan 20, 2009 at 7:32 AM, Renaud Durand <span dir="ltr"><<a href="http://renaud.durand.it" target="_blank">renaud.durand.it</a>@<a href="http://gmail.com" target="_blank">gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>Hi, <br><br>I want to use IronPython function through C#. To do It, I found a tutorial at <a href="http://www.ironpython.info/index.php/Hosting_IronPython_2" target="_blank">http://www.ironpython.info/index.php/Hosting_IronPython_2</a>.<br>
But the code does not seem to be updated for IronPython 2.0.<br><br>the code is :<br><br>using System;<br>using IronPython.Hosting;<br>using IronPython.Runtime;<br>using Microsoft.Scripting;<br>using Microsoft.Scripting.Hosting;<br>
<br>namespace EmbeddedCalculator<br>{<br> public class Engine<br> {<br> private ScriptEngine engine;<br><br> public Engine()<br> {<br> engine = PythonEngine.CurrentEngine;<br> }<br>
<br> public string calculate(string input)<br> {<br> try<br> {<br> ScriptSource source = engine.CreateScriptSourceFromString(input, "py");<br> return source.Execute().ToString();<br>
}<br> catch<br> {<br> return "Error";<br> }<br> }<br><br> }<br>}<br clear="all">// End of code<br><br>When I try to compile it in visual studio, the compiler could not find the name "PythonEngine". I have added all the references to<br>
the needed libraries. So, what am I missing ?<br><br><br>Thank you :-).<br><br>-- <br><font color="#888888">Renaud Durand<br>
</font><br></div></div>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com" target="_blank">Users@lists.ironpython.com</a><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com" target="_blank">Users@lists.ironpython.com</a><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Renaud Durand<br>