Re: [IronPython] .NET can see Python classes?

2007-08-05 Thread Darren Govoni
embedded in my app. Darren - Original Message - From: Curt Hagenlocher To: Discussion of IronPython Sent: Sunday, August 05, 2007 12:31 PM Subject: Re: [IronPython] .NET can see Python classes? On 8/4/07, Darren Govoni [EMAIL PROTECTED] wrote: Can .NET see python

Re: [IronPython] .NET can see Python classes?

2007-08-05 Thread John J Lee
On Sun, 5 Aug 2007, Curt Hagenlocher wrote: On 8/4/07, Darren Govoni [EMAIL PROTECTED] wrote: [...] construction in ways that CLR classes are not. In order to expose a Python class directly to the CLR, it would have to be frozen in some manner, and A metaclass could achieve that. you might

Re: [IronPython] .NET can see Python classes?

2007-08-05 Thread Bryan
On 8/5/07, Curt Hagenlocher [EMAIL PROTECTED] wrote: On 8/4/07, Darren Govoni [EMAIL PROTECTED] wrote: The fundamental issue here is that Python classes don't follow the same semantics as CLR classes. They are, for instance, mutable after construction in ways that CLR classes are not. In

Re: [IronPython] .NET can see Python classes?

2007-08-05 Thread Curt Hagenlocher
On 8/5/07, Bryan [EMAIL PROTECTED] wrote: i to would like to do this. i don't understand a part of this. i understand creating a CLR interface and i understand creating a python file that has a class that derives from the CLR interface. but how does the CLR code instantiate the derived

Re: [IronPython] .NET can see Python classes?

2007-08-05 Thread Michael Foord
Ori wrote: you can try the following code: PythonEngine engine = new PythonEngine(); EngineModule module = engine.CreateModule(); engine.Execute(handleCode(code, def), module); # code contains definition for python class 'PyClass' UserType ptype = module.Globals[PyClass] as UserType;

Re: [IronPython] .NET can see Python classes?

2007-08-05 Thread Bryan
On 8/5/07, Michael Foord [EMAIL PROTECTED] wrote: Here is a full example: using System; using IronPython.Hosting; using IronPython.Runtime.Types; using IronPython.Runtime.Operations; namespace TestPythonConsole { class Program { static void Main() {

Re: [IronPython] .NET can see Python classes?

2007-08-05 Thread Michael Foord
Bryan wrote: On 8/5/07, Michael Foord [EMAIL PROTECTED] wrote: Here is a full example: [snip...] this is great news. this is very helpful... thanks. i assume there is another Execute method that you can pass in a path to file or take a file object so we don't have to write the

[IronPython] .NET can see Python classes?

2007-08-04 Thread Darren Govoni
Hi, Can .NET see python defined classes or objects? I define a class in Python but one of my .NET classes tries to find it via reflection and it cannot. I saw a post about this that is over a year old saying it was not then supported. Could this possible in IP 2.0? thank you,

Re: [IronPython] .NET can see Python classes?

2007-08-04 Thread Ori
in IP 2.0? thank you, D ___ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- View this message in context: http://www.nabble.com/-IronPython--.NET-can-see-Python-classes