<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3199" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=599215015-26112007><FONT face=Arial size=2>HI 
All,</FONT></SPAN></DIV>
<DIV><SPAN class=599215015-26112007><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=599215015-26112007><FONT face=Arial size=2>I have c#&nbsp; code 
which should call a Iron Python function. I am using Iron python 1.1 version and 
Visual Studio 2005. The details of my files are as follows:</FONT></SPAN></DIV>
<DIV><SPAN class=599215015-26112007><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=599215015-26112007><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=599215015-26112007><FONT face=Arial size=2><STRONG>&nbsp;C# 
code (Entry.cs):</STRONG></FONT></SPAN></DIV>
<DIV><SPAN class=599215015-26112007><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=599215015-26112007><FONT color=#0000ff size=2>
<P><FONT face=Arial>using</FONT></FONT><FONT size=2><FONT face=Arial> 
System;</FONT></P></FONT><FONT color=#0000ff size=2>
<P><FONT face=Arial>using</FONT></FONT><FONT size=2><FONT face=Arial> 
System.Collections;</FONT></P></FONT><FONT color=#0000ff size=2>
<P><FONT face=Arial>using</FONT></FONT><FONT size=2><FONT face=Arial> 
IronPython.Hosting;</FONT></P></FONT></SPAN><SPAN 
class=599215015-26112007></DIV>
<DIV>
<P><FONT size=2><FONT face=Arial><FONT color=#0000ff>public</FONT> <FONT 
color=#0000ff>class</FONT> <FONT color=#008080>Entry</P></FONT></FONT></FONT>
<P><FONT size=2><FONT face=Arial>{<FONT color=#008000></P></FONT></FONT></FONT>
<P><FONT size=2><FONT face=Arial><FONT color=#0000ff><SPAN 
class=599215015-26112007>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>public</FONT> <FONT color=#0000ff>static</FONT> <FONT 
color=#0000ff>void</FONT> Main(<FONT color=#0000ff>string</FONT>[] 
args)</FONT></FONT></P>
<P><FONT size=2><FONT face=Arial><SPAN 
class=599215015-26112007>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>{</FONT></FONT></P>
<P><SPAN class=599215015-26112007><FONT face=Arial 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
int a= 2, b= 4;</FONT></SPAN></P>
<P><SPAN class=599215015-26112007><FONT face=Arial 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT 
color=#ff0000>&nbsp;&nbsp; // OVER HERE I WOULD LIKE TO CALL IRONPYTHON 
Function: ArithmeticOperations which takes arguments 
a,b</FONT></FONT></SPAN></P>
<P><SPAN class=599215015-26112007><FONT face=Arial 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
}</FONT></SPAN></P>
<P><FONT face=Arial size=2>}</FONT></P>
<P><SPAN class=599215015-26112007><STRONG>PYTHON 
SCRIPT(ArithmeticOperations.py):</STRONG></SPAN></P>
<P><SPAN class=599215015-26112007><FONT face=Arial size=2>def 
ArithmeticOperations( a,b):</FONT></SPAN></P>
<P><SPAN class=599215015-26112007><FONT face=Arial size=2>print "I am in 
ArithmeticOperation functions..."</FONT></SPAN></P>
<P><SPAN class=599215015-26112007><FONT face=Arial size=2>return&nbsp; 
a+b</FONT></SPAN></P>
<P><SPAN class=599215015-26112007><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</P>
<P><SPAN class=599215015-26112007><FONT face=Arial size=2>In my project setup, I 
gave reference to include : IronPython, IronMath dll's</FONT></SPAN></P>
<P><SPAN class=599215015-26112007><FONT face=Arial size=2>In this regard, please 
do let me know, how to call the python script "Arithmetic Operations" from my 
Entry.cs file ? Also, please do let me know, if I have to include any of the 
libraries ?</FONT></SPAN></P>
<P><SPAN class=599215015-26112007><FONT face=Arial 
size=2>Regards,</FONT></SPAN></P>
<P><SPAN class=599215015-26112007><FONT face=Arial 
size=2>Sathish</FONT></SPAN></P>
<P><SPAN class=599215015-26112007><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</P>
<P><SPAN class=599215015-26112007><FONT size=2></FONT></SPAN>&nbsp;</P>
<P><SPAN class=599215015-26112007><FONT 
size=2></FONT></SPAN>&nbsp;</P></SPAN></DIV>
<P align=left><FONT face=Arial size=2>
<HR>
<FONT size=1><FONT face=Verdana><FONT color=#808080><U>Legal Notice:</U> <BR>The 
information in this electronic transmission may contain confidential or legally 
privileged information and is intended solely for the individual(s) named above. 
If you are not an intended recipient or an authorized agent, you are hereby 
notified that reading, distributing, or otherwise disseminating, copying or 
taking any action based on the contents of this transmission is strictly 
prohibited. Any unauthorized interception of this transmission is illegal under 
law. If you have received this transmission in error, please notify the sender 
by telephone [at the number indicated above/on +41&nbsp;58 928 0101] as soon as 
possible and then destroy all copies of this 
transmission.</FONT>&nbsp;<BR></FONT></FONT>
<HR>
</FONT><!-- END MESSAGE BODY -->
</BODY></HTML>