[IronPython] Declare a class in Python and use it in .net

Ori oorrii at gmail.com
Fri Aug 3 10:28:16 PDT 2007


How can I do what I asked using delegate? I have to inherit from a class,
override a method and return an object. I guess I can manage with returning
a delegate that execute the overriden method - but it is important to me
that the metod will be a part of a class because the code has calls to other
class properties and methods.


Dino Viehland wrote:
> 
> Because Python doesn't create normal .NET classes they basically have to
> be created from Python code.  You could hand a delegate (just a Python
> function that matches the delegates # of arguments) off to the C# code and
> call that from C# and get the result back.
> 
> -----Original Message-----
> From: users-bounces at lists.ironpython.com
> [mailto:users-bounces at lists.ironpython.com] On Behalf Of Ori
> Sent: Thursday, August 02, 2007 10:53 PM
> To: users at lists.ironpython.com
> Subject: [IronPython] Declare a class in Python and use it in .net
> 
> 
> Hello,
> 
> I have a .net class (in some assembly). I want to inherit from it and
> override a function in it - with python code. I'm using c# to compile the
> python code, and after the compilation is done I want to create an
> instance
> of the new class inside c#.
> 
> Is there a way to do it?
> 
> Thanks,
> Ori
> --
> View this message in context:
> http://www.nabble.com/Declare-a-class-in-Python-and-use-it-in-.net-tf4210730.html#a11977831
> Sent from the IronPython mailing list archive at Nabble.com.
> 
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Declare-a-class-in-Python-and-use-it-in-.net-tf4210730.html#a11987743
Sent from the IronPython mailing list archive at Nabble.com.



More information about the Users mailing list