[IronPython] How to call a class written in IronPython in vb.net?

Lukas Cenovsky cenovsky at bakalari.cz
Fri Jul 23 14:36:24 CEST 2010


  You cannot use mksmath.dll directly from VB (see 
http://ironpython.net/documentation/dotnet/dotnet.html#id86) so you have 
to host IronPython engine in your VB app and use MksMath from the 
engine. See 
http://www.ironpython.info/index.php/Using_Compiled_Python_Classes_from_.NET/CSharp_IP_2.6 
for example (in C#).

--
-- Lukas



On 23.7.2010 12:19, M K Saravanan wrote:
> Hi,
>
> I am a newbie to IronPython.  I wrote a small test class in IronPython
> which I want to use in vb.net.
>
> For e.g.
>
> class MksMath(object):
> 	def __init__(self):
> 		pass
> 	def add(a,b):
> 		return a+b
> 	def sub(a,b):
> 		return a-b
> 	def mul(a,b):
> 		return a*b
> 	def div(a,b):
> 		return a/b
>
> Using SharpDevelop 3.2, I am compiling it as a class library which
> produces the following files:
>
> IronPython.dll
> IronPython.Modules.dll
> IronPython.Modules.xml
> IronPython.xml
> Microsoft.Dynamic.dll
> Microsoft.Scripting.Core.dll
> Microsoft.Scripting.Debugging.dll
> Microsoft.Scripting.dll
> Microsoft.Scripting.ExtensionAttribute.dll
> mksmath.dll
>
> Now how do I use this class in vb.net?  Sorry if my question is too basic.
>
> -- mks --
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>




More information about the Ironpython-users mailing list