Re: [IronPython] Determine the classes/interfaces a Python implements

2008-12-15 Thread Curt Hagenlocher
M > To: Discussion of IronPython > Subject: Re: [IronPython] Determine the classes/interfaces a Python > implements > > > Hi Jeff, > > Probably the easiest way of doing this is to define a Python function > that uses issubtype. You can use this as a delegate from

Re: [IronPython] Determine the classes/interfaces a Python implements

2008-12-15 Thread Dino Viehland
s.ironpython.com] On Behalf Of Michael Foord Sent: Monday, December 15, 2008 1:20 PM To: Discussion of IronPython Subject: Re: [IronPython] Determine the classes/interfaces a Python implements Hi Jeff, Probably the easiest way of doing this is to define a Python function that uses issubtype. You can u

Re: [IronPython] Determine the classes/interfaces a Python implements

2008-12-15 Thread Dino Viehland
You should call PythonOps.IsSubClass and pass in the PythonType and the interface you want to compare it with. The interface can be either a .NET type object or another Python type object (or a tuple, etc...) The not raising on missing functions is a feature :) You could build a meta-class wh

Re: [IronPython] Determine the classes/interfaces a Python implements

2008-12-15 Thread Seo Sanghyeon
2008/12/16 Michael Foord : > Probably the easiest way of doing this is to define a Python function that > uses issubtype. You can use this as a delegate from the C# side (warning > untested): You mean issubclass... -- Seo Sanghyeon ___ Users mailing li

Re: [IronPython] Determine the classes/interfaces a Python implements

2008-12-15 Thread Michael Foord
Hi Jeff, Probably the easiest way of doing this is to define a Python function that uses issubtype. You can use this as a delegate from the C# side (warning untested): ScriptScope scope = engine.CreateScope(); ScriptSource imports = engine.CreateScriptSourceFromString("from System import IS